#236236th of 433 in ML frameworks and libraries

torchmetrics

PyTorch metrics library with automatic accumulation and multi-device sync

Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.

Stars
2.5k
License
Apache-2.0
Last commit
Nov 2026
Last release
Mar 2026
Language
Python
Stars, last 30 weeks+65
27 Apr 2026: 2,420 stars4 May 2026: 2,421 stars11 May 2026: 2,425 stars18 May 2026: 2,427 stars25 May 2026: 2,430 stars1 Jun 2026: 2,431 stars8 Jun 2026: 2,435 stars15 Jun 2026: 2,437 stars22 Jun 2026: 2,437 stars29 Jun 2026: 2,439 stars6 Jul 2026: 2,440 stars13 Jul 2026: 2,440 stars20 Jul 2026: 2,445 stars27 Jul 2026: 2,445 stars3 Aug 2026: 2,450 stars10 Aug 2026: 2,452 stars17 Aug 2026: 2,455 stars24 Aug 2026: 2,458 stars31 Aug 2026: 2,462 stars7 Sept 2026: 2,463 stars14 Sept 2026: 2,466 stars21 Sept 2026: 2,470 stars28 Sept 2026: 2,472 stars5 Oct 2026: 2,472 stars12 Oct 2026: 2,474 stars19 Oct 2026: 2,475 stars26 Oct 2026: 2,477 stars2 Nov 2026: 2,480 stars9 Nov 2026: 2,482 stars16 Nov 2026: 2,484 stars23 Nov 2026: 2,485 stars

2,420 on 27 Apr 20262,485 on 23 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Lightning AI is hiring: 49 open roles

Overview

TorchMetrics is a Python library of 100+ metric implementations for PyTorch, covering audio, classification, detection, retrieval, image, multimodal, nominal, regression, segmentation and text. Metrics are stateful modules that accumulate over batches and synchronize across devices in DDP, with functional versions as well. Custom metrics are written by subclassing Metric and implementing update and compute.

Who it is for: PyTorch and Lightning users evaluating models, including in distributed training

Strengths

  • Module metrics accumulate over batches and sync across GPUs and nodes automatically
  • Both stateful module and stateless functional APIs for most metrics
  • Custom metrics need only add_state, update and compute on a Metric subclass
  • Built-in .plot method for most module metrics; works with plain PyTorch or Lightning

Weaknesses

  • PyTorch only; no support for other tensor frameworks
  • Audio, image and text metrics need extra pip dependency groups
  • Plotting requires a separate optional install (torchmetrics[visual])
  • README notes the Lightning framework is Patent Pending, alongside Apache-2.0

What it needs

  • GPU optional
  • Needs PyTorch

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS

Also in ML frameworks and libraries

See all 433
Also in ML frameworks and libraries
RankProjectScore
#234thunderkittensHeader-only CUDA library of tile primitives for writing fast GPU kernels3.8k starsMIT52 out of 100
#235deepopenPython SDK for non-generative text classification, scoring and routing decisions Live demo ↗ (opens in a new tab)2.9k starsApache-2.052 out of 100
#237mlj.jlJulia toolbox with a common interface for tuning and evaluating ML models1.9k starscustom license52 out of 100
#238minisomNumPy-based Python library for training Self Organizing Maps Live demo ↗ (opens in a new tab)1.6k starsMIT52 out of 100
#239spacy-transformersspaCy components that run Hugging Face transformer models inside pipelines1.4k starsMIT52 out of 100