Skip to main content

Boxkite logo

PyPI version PyPI license PyPI pyversions CI workflow codecov

{Fast, Correct, Simple} - pick three

Easily compare training and production ML data & model distributions

Goals

Boxkite is an instrumentation library designed from ground up for tracking concept drift in HA (Highly Available) model servers. It integrates well with existing DevOps tools (ie. Grafana, Prometheus, fluentd, kubeflow, etc.), and scales horizontally to multiple replicas with no code or infrastructure change.

  • Fast
    • 0.5 seconds to process 1 million data points (training)
    • Sub millisecond p99 latency (serving)
    • Supports sampling for large data sets
  • Correct
    • Aggregates histograms from multiple server replicas (using PromQL)
    • Separate counters for discrete and continuous variables (ie. categorical and numeric features)
    • Initialises serving histogram bins from training data set (based on Freedman-Diaconis rule)
    • Handles unseen data, nan, None, inf, and negative values
  • Simple
    • One metric for each counter type (no confusion over which metric to choose)
    • Default configuration supports both feature and inference monitoring (easy to setup)
    • Small set of dependencies: prometheus, numpy, and fluentd
    • Extensible metric system (support for image classification coming soon)

Some non-goals of this project are:

  • Adversarial detection

If you are interested in alternatives, please refer to our discussions in FAQ.

Getting Started

Follow one of our tutorials to easily get started and see how Boxkite works with other tools:

See Installation & User Guide for how to use Boxkite in any environment.

FAQ

  1. Does boxkite support anomaly / outlier detection?

Prometheus has supported outlier detection in time series data since 2015. Once you've setup KL divergence and K-S test metrics, outlier detection can be configured on top using alerting rules. For a detailed example, refer to this tutorial: https://prometheus.io/blog/2015/06/18/practical-anomaly-detection/.

  1. Does boxkite support adversarial detection?

Adversarial detection concerns with identifying single OOD (Out Of Distribution) samples rather than comparing whole distributions. The algorithms are also highly model specific. For these reasons, we do not have plans to support them in boxkite at the moment. As an alternative, you may look into Seldon for such capabilities https://github.com/SeldonIO/alibi-detect#adversarial-detection.

  1. Does boxkite support concept drift detection for text / NLP models?

Not yet. This is still an actively researched area that we are keeping an eye on.

  1. Does boxkite support tensorflow / pytorch?

Yes, our instrumentation library is framework agnostic. It expects input data to be a list or np.array regardless of how the model is trained.

Contributors

The following people have contributed to the original concept and code

A full list of contributors, which includes individuals that have contributed entries, can be found here.

Shameless plug

Boxkite is a project from BasisAI, who offer an MLOps Platform called Bedrock.

Bedrock helps data scientists own the end-to-end deployment of machine learning workflows. Boxkite was originally part of the Bedrock client library, but we've spun it out into an open source project so that it's useful for everyone!

Release files for boxkite 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boxkite 0.0.5
File Size Uploaded
boxkite-0.0.5.tar.gz 23.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for boxkite 0.0.5
File Interpreter ABI Platform
boxkite-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 55.0 kB

Release files / boxkite-0.0.5.tar.gz

Download URL boxkite-0.0.5.tar.gz
Size 23.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b40e1595ccdd94f1ec3e0948070e391d0565125f5ded555d0aef4a5341ba879d
BLAKE2b-256 checksum
How to use checksums
d2aba46a6624d2e8f81f1d8e3d1a11a594c467ce4231738f3d3d5af7b84af0ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / boxkite-0.0.5-py3-none-any.whl

Download URL boxkite-0.0.5-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d5946c10ce06a48cc5d5c81ef2653a08360e4f1cdc63955e81d34758b68f86b
BLAKE2b-256 checksum
How to use checksums
d642b689363c5bff118b68fe9a7a06365cfd6c22e5509548e0b90cacc8f3da44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page