Lightning-AI/torchmetrics
A PyTorch library providing implementations of evaluation metrics (accuracy, precision, F1, etc.) designed to work in distributed, scalable training environments.

Torchmetrics is a machine learning metrics library built specifically for PyTorch applications. It provides a collection of standardized metric implementations (accuracy, precision, recall, F1, AUC, etc.) that support distributed computation and are compatible with PyTorch Lightning. Metrics are implemented as torch.nn modules that can be passed to GPU and work across multiple devices for large-scale model evaluation.