mabwiser
MABWiser: Parallelizable Contextual Multi-Armed Bandits Library
What it is and what it does
MABWiser is a research library for prototyping multi-armed bandit algorithms—a class of decision-making strategies that balance exploring new options against exploiting known good ones. It provides multiple learning policies (Epsilon Greedy, LinUCB, Thompson Sampling, UCB1, and others) and neighborhood policies (Clusters, K-Nearest, LSH Nearest, Radius, TreeBandit) to handle both simple arm-selection problems and contextual variants where decisions depend on feature data. The library follows scikit-learn conventions, includes a simulation utility for policy comparison and hyperparameter tuning, and supports parallelization across training and prediction.
The package is built on standard scientific Python dependencies (numpy, pandas, scikit-learn, scipy, joblib) and is maintained by Fidelity's AI Center of Excellence. It is used in downstream projects like Mab2Rec for personalized recommendations and ALNS for combinatorial optimization. The library is dormant—last release was 2024-08-30 with no active development—but remains stable for research and prototyping use.
Use it for:
- Build a personalized recommendation system that learns which content to show each user by treating items as arms and user feedback as rewards.
- Implement A/B testing or multi-variant testing where you need to dynamically allocate traffic to better-performing variants while still exploring.
- Solve combinatorial optimization problems (e.g., vehicle routing, scheduling) by using bandits to select destroy-repair operations in a metaheuristic.
- Prototype and compare different exploration-exploitation strategies on a decision problem before deploying to production.
- Tune hyperparameters of bandit policies using the built-in simulation utility to find optimal settings for your reward structure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
MABWiser implements multi-armed bandit algorithms for decision-making under uncertainty, supporting context-free, parametric, and non-parametric contextual models with built-in parallelization for training and testing.
Yes, if you are prototyping or researching multi-armed bandit algorithms in Python. The library is stable, well-documented, has no known vulnerabilities, and low install friction. However, dormant maintenance means no active bug fixes or feature development—suitable for research and learning, less ideal if you need ongoing support or expect breaking changes in your dependencies.
Install
mabwiser on PyPI
pip
pip install mabwiseruv
uv add mabwiserpoetry
poetry add mabwiserInstalling mabwiser
Before you install
Low friction: pure Python wheel with standard scientific dependencies (joblib, numpy, pandas, scikit-learn, scipy, seaborn). Last commit was 2024-09-05, but maintenance is dormant—no active development expected.
License in practice
Apache License 2.0 is permissive; you can use, modify, and distribute MABWiser freely in commercial and open-source projects with minimal restrictions.
Quickstart
from mabwiser.mab import MAB, LearningPolicy
arms = ['Arm1', 'Arm2']
mab = MAB(arms, LearningPolicy.UCB1(alpha=1.25))
mab.fit(['Arm1', 'Arm1', 'Arm2', 'Arm1'], [20, 17, 25, 9])
mab.predict()
Verify before relying
- Whether the library actively supports Python versions beyond 3.8 despite classifier only listing 3.8
- Current test coverage and whether heavy testing mentioned in description is still maintained
- Whether parallelization features are production-ready or primarily research-oriented
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — joblib, numpy, pandas, scikit-learn, scipy, seaborn |
| Maintenance | dormant — 714 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 99,270/month — #13,031 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mabwiser-2.7.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
sb3-contribProvides experimental reinforcement learning…
permissive · top 15,000 on PyPI
ax-platformAx is a platform for adaptive experimentation…
permissive · top 15,000 on PyPI
rsl-rl-libRSL-RL is a GPU-accelerated reinforcement…
permissive · top 15,000 on PyPI
pymoopymoo implements single- and multi-objective…
permissive · top 5,000 on PyPI
implicitImplicit provides fast Python implementations…
permissive · top 15,000 on PyPI
skrlskrl is a modular reinforcement learning…
permissive · top 15,000 on PyPI
open-spielOpenSpiel provides game environments and…
permissive · top 15,000 on PyPI
banditBandit scans Python code to identify common…
permissive · top 1,000 on PyPI
proxsuiteProxSuite is a numerically robust quadratic…
permissive · top 15,000 on PyPI
emceeemcee implements affine-invariant ensemble…
permissive · top 5,000 on PyPI