google-metrax
A centralized JAX metrics library.
What it is and what it does
Metrax is a JAX metrics library that fills a gap in the JAX ecosystem by providing standard evaluation metrics commonly found in TensorFlow and PyTorch. It builds on CLU (CommonLoopUtils) to ensure compatibility with distributed and scaled training environments. The library includes predefined metrics for classification, regression, recommendation, and language modeling tasks, allowing developers to evaluate JAX models without writing custom metric implementations.
The package is developed on GitHub and used by several Google core products, indicating production-level maturity. It depends on core JAX libraries (jax, numpy, flax) plus clu for distributed training support and tensorboardx for visualization integration. Installation is straightforward via pip, and the library is actively maintained with recent development activity.
Use it for:
- Evaluate classification models in JAX by computing standard metrics like accuracy, precision, recall, and F1-score.
- Measure regression model performance using built-in loss and error metrics compatible with JAX workflows.
- Assess recommendation system quality with metrics designed for ranking and recommendation tasks.
- Monitor language model evaluation metrics during training with tensorboardx integration for visualization.
- Build distributed training pipelines with metrics that scale across multiple devices via CLU integration.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Metrax provides standard evaluation metrics for machine learning models implemented in JAX, supporting classification, regression, recommendation, and language modeling tasks.
Yes. Metrax is actively maintained, has low install friction, carries a permissive Apache 2.0 license, and addresses a real gap in the JAX ecosystem. It's backed by Google and used in production. Install it if you're building JAX-based ML models and need standard evaluation metrics without implementing them yourself.
Install
google-metrax on PyPI
pip
pip install google-metraxuv
uv add google-metraxpoetry
poetry add google-metraxInstalling google-metrax
Before you install
Low install friction with a pure Python wheel. Actively maintained with recent commits and used by Google products. Depends on JAX ecosystem libraries (jax, flax, clu, numpy) and tensorboardx, which are standard in JAX-based ML workflows.
License in practice
Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute the package freely in commercial and private projects, provided you include the license and attribute the original work.
Quickstart
pip install google-metrax
import metrax
# Use predefined metrics for model evaluation
# (specific metric usage depends on your model type)
Requires JAX and its dependencies (jax, numpy, flax) to be installed; JAX itself has platform-specific requirements.
Verify before relying
- Which specific metrics are included for each model type (classification, regression, recommendation, language modeling).
- Whether metrax integrates with common JAX training loops or requires custom integration.
- Performance characteristics when used with large-scale distributed training.
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — clu, flax, jax, numpy, tensorboardx |
| Maintenance | actively maintained — 274 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 75,599/month — #14,697 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: google_metrax-0.2.4-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
raxRax provides ranking losses and metrics for…
permissive · top 15,000 on PyPI
jaxJAX is a Python library for automatic…
permissive · top 1,000 on PyPI
jaxlibjaxlib is the compiled XLA backend that enables…
permissive · top 5,000 on PyPI
tokamaxTokamax provides custom accelerator kernels for…
permissive · top 15,000 on PyPI
google-tunixTunix is a JAX-based library for post-training…
permissive · top 15,000 on PyPI
cluCLU provides utilities and abstractions for…
permissive · top 15,000 on PyPI
arize-phoenix-evalsPhoenix Evals provides composable building…
unclear · top 5,000 on PyPI
torchmetricsTorchmetrics provides a collection of PyTorch…
permissive · top 5,000 on PyPI
jax-cuda12-pluginEnables JAX to run numerical computations and…
permissive · top 15,000 on PyPI