ranx
ranx: A Blazing-Fast Python Library for Ranking Evaluation, Comparison, and Fusion
Decision gist · record as of 2026-08-14
Yes, if you are evaluating information retrieval or recommender system rankings. ranx is a mature, well-cited library with no known vulnerabilities, permissive licensing, and low install friction. The 372-day gap since the last release suggests aging maintenance, but the repository is not archived and the package remains functional for its core use case. Install it if you need fast, standard-compliant ranking metrics and statistical testing; avoid it if you need active feature development or cutting-edge research implementations.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- Numba JIT compilation may add startup latency on first use.
- Low install friction with a pure-Python wheel distribution.
License · maintenance · safety
permissive license (permissive) — Licensed under permissive terms (MIT), so you can use it freely in commercial and open-source projects without copyleft obligations.
last release 2025-08-07 (372 days) · last repo commit 2025-08-07 · 692 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 147,163 downloads/mo, #11,077 on PyPI
Alternatives
Verify before relying
pip install ranx
from ranx import Qrels, Run, evaluate
qrels = Qrels.from_ir_datasets("msmarco-document/dev")
run = Run.from_ranxhub("run-id")
results = evaluate(qrels, run, metrics=["ndcg@10", "map"])- Whether the 13 runtime dependencies (numpy, numba, pandas, scipy, etc.) are all required for basic metric computation or only for optional features like fusion and statistical tests.
- Performance characteristics and memory overhead when evaluating very large ranking datasets.
- Whether the package is actively maintained or in maintenance-only mode given the 372-day gap since the last release.
What it is and what it does
ranx is a Python library for evaluating and comparing rankings in information retrieval and recommender systems. It implements standard metrics like NDCG, MAP, MRR, precision, recall, and others, using Numba to accelerate vector operations and automatic parallelization. The library also provides statistical tests (paired t-test, Fisher's randomization test, Tukey's HSD) to determine whether differences between ranked results are significant, and can export results as LaTeX tables for scientific publications.
Beyond basic metrics, ranx includes fusion algorithms (CombMNZ, RRF, BayesFuse, and others) to combine multiple ranking runs, normalization strategies to standardize scores across runs, and automatic fusion optimization. It integrates with ir-datasets to load standard IR benchmarks (MSMARCO, etc.) and ranxhub to download and share pre-computed runs. The package is designed specifically for ranking evaluation—not classifier evaluation—and has been presented at ECIR 2022, CIKM 2022, and SIGIR 2023.
Use it for
- Compute NDCG, MAP, and other metrics to evaluate a search engine or recommender system against ground-truth relevance judgments.
- Run statistical tests to determine whether one ranking algorithm significantly outperforms another.
- Combine multiple ranking runs using fusion algorithms and automatically optimize fusion weights.
- Load standard IR evaluation datasets and pre-computed runs from ranxhub to benchmark new models.
- Generate publication-ready LaTeX tables comparing multiple ranking systems and their metric scores.
- Normalize and compare ranking scores across different systems or datasets using built-in normalization strategies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are evaluating information retrieval or recommender system rankings.
ranx is a mature, well-cited library with no known vulnerabilities, permissive licensing, and low install friction. The 372-day gap since the last release suggests aging maintenance, but the repository is not archived and the package remains functional for its core use case. Install it if you need fast, standard-compliant ranking metrics and statistical testing; avoid it if you need active feature development or cutting-edge research implementations.
Install
ranx on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is aging—last release was 372 days ago—but the repository remains active and the package has accrued 692 stars.
Requires Python 3.8 or later. Numba JIT compilation may add startup latency on first use.
License in practice
Licensed under permissive terms (MIT), so you can use it freely in commercial and open-source projects without copyleft obligations.
Quickstart
pip install ranx
from ranx import Qrels, Run, evaluate
qrels = Qrels.from_ir_datasets("msmarco-document/dev")
run = Run.from_ranxhub("run-id")
results = evaluate(qrels, run, metrics=["ndcg@10", "map"])
Verify before relying
- Whether the 13 runtime dependencies (numpy, numba, pandas, scipy, etc.) are all required for basic metric computation or only for optional features like fusion and statistical tests.
- Performance characteristics and memory overhead when evaluating very large ranking datasets.
- Whether the package is actively maintained or in maintenance-only mode given the 372-day gap since the last release.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 13 packagesnumpynumbapandastabulatetqdmscipyir-datasetsrichorjsonlz4cbor2seabornfastparquet |
| Maintenance | Aging 372 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 147,163 / month, #11,077 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Text Processing :: General |
Evidence: ranx-0.3.21-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ranking evaluation metrics”
- ranxranx computes ranking evaluation metrics (precision, recall, NDCG,…
- pytrec-eval-terrierProvides Python bindings to TREC's trec_eval tool for computing…
- ir-measuresProvides a unified Python interface to compute standard information…
Give your agent the search over MCP, or paste the wish link into any chat.
More General packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.
NLTK is a Python library for natural language processing tasks including tokenization, parsing, tagging, and linguistic analysis, with built-in datasets and educational resources.
Install it if you need foundational NLP tools, linguistic datasets, or are learning the field; consider specialized libraries (spaCy, transformers) if you need…
Converts numbers, dates, times, and file sizes into human-readable text formats, with support for fuzzy durations like "3 minutes ago" and localization to multiple languages.
Install it if you need to display human-readable numbers, durations, or sizes to end users.
See also ir-measures · rax · recbole · pytrec-eval · pytrec-eval-terrier · krippendorff · mir-eval · google-metrax · trec-car-tools · rouge