Hugging Face Evaluate
ActiveDescription
A library by Hugging Face for easily evaluating machine learning models and datasets, providing a wide range of metrics and evaluation methods.
Key Features
- Standardized metrics library — load dozens of popular metrics with `load('accuracy')`, covering NLP, CV, and dataset-specific tasks
- Framework-agnostic evaluation — works across Numpy, Pandas, PyTorch, TensorFlow, and JAX without code changes
- Type-safe inputs — automatic type checking ensures correct input formats for each metric
- Metric cards — each metric includes documentation of values, limitations, ranges, and usage examples
- Community Hub integration — publish custom evaluation modules to Hugging Face Hub and share with others
- CLI for metric creation — scaffold new evaluation modules with `evaluate-cli create` and push to Hub Spaces
Use Cases
Categories
Quick Start
# Install
pip install evaluate
# Usage
import evaluate
accuracy = evaluate.load('accuracy')
results = accuracy.compute(predictions=[1, 2, 3], references=[1, 2, 4])
print(results)