Package: boxkite
{Fast, Correct, Simple} - pick threeEasily compare training and production ML data & model distributionsGoalsBoxkite is an instrumentation library designed from ground up for trackingconcept driftin 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.Fast0.5 seconds to process 1 million data points (training)Sub millisecond p99 latency (serving)Supports sampling for large data setsCorrectAggregates 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 valuesSimpleOne 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 fluentdExtensible metric system (support for image classification coming soon)Some non-goals of this project are:Adversarial detectionIf you are interested in alternatives, please refer to our discussions inFAQ.Getting StartedFollow one of our tutorials to easily get started and see how Boxkite works with other tools:Prometheus & Grafanain Docker Compose locallyKubeflow & MLflowon Kubernetes witheasy online test drive in the browserSeeInstallation&User Guidefor how to use Boxkite in any environment.FAQDoes 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/.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 capabilitieshttps://github.com/SeldonIO/alibi-detect#adversarial-detection.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.Does boxkite support tensorflow / pytorch?Yes, our instrumentation library is framework agnostic. It expects input data to be alistornp.arrayregardless of how the model is trained.ContributorsThe following people have contributed to the original concept and codeHan QiaoNguyen Hien LinhLuke MarsdenMariappan RamasamyA full list of contributors, which includes individuals that have contributed entries, can be foundhere.Shameless plugBoxkite is a project from BasisAI, who offer an MLOps Platform called Bedrock.Bedrockhelps 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!