Lightweight library for training & serving contextual bandit models.


Keywords
bandits, contextual-bandits, neural-networks, personalization, pytorch, reinforcement-learning
License
GPL-3.0
Install
pip install banditml==0.6.0

Documentation

Bandit ML

PyPI version

What's banditml?

banditml is a lightweight contextual bandit & reinforcement learning library designed to be used in production Python services. This library is developed by Bandit ML and ex-authors of Facebook's applied reinforcement learning platform, Reagent.

Specifically, this repo contains:

  • Feature engineering & preprocessing
  • Model implementations
  • Model training workflows
  • Model serving code for Python services

Supported models

Models supported:

4 feature types supported:

  • Numeric: standard floating point features
    • e.g. {totalCartValue: 39.99}
  • Categorical: low-cardinality discrete features
    • e.g. {currentlyViewingCategory: "men's jeans"}
  • ID list: high-cardinality discrete features
    • e.g. {productsInCart: ["productId022", "productId109"...]}
    • Handled via. learned embedding tables
  • "Dense" ID list: high-cardinality discrete features, manually mapped to dense feature vectors
    • e.g {productId022: [0.5, 1.3, ...], productId109: [1.9, 0.1, ...], ...}

Docs

pip install banditml

Get started

License

GNU General Public License v3.0 or later

See COPYING to see the full text.