Skip to main content

Implements Bayesian D-PDDM for Post-Deployment Deterioration Monitoring of ML models.

Project description

Bayesian D-PDDM

Bayesian implementation of the D-PDDM algorithm for post-deployment deterioration monitoring. Bayesian D-PDDM is a Bayesian approximation to the D-PDDM algorithm which provably monitors model deterioration at deployment time. Bayesian D-PDDM:

  • Flags deteriorating shifts in the unsupervised deployment data distribution
  • Resists flagging non-deteriorating shifts, unlike classical OOD detection leveraging distances and/or metrics between data distributions.

Installation and Requirements

This implementation requires python>=3.11.

The easiest way to install bayesian_dpddm is with pip:

pip install bayesian_dpddm

You can also install by cloning the GitHub repo:

# Clone the repo
git clone https://github.com/teivng/bayesian_dpddm.git

# Navigate into repo directory 
cd bayesian_dpddm

# Install the required dependencies
pip install .

Sweeping Instructions

All experiments are running from the root directory of the repo. We use hydra-core as an argparse on steroids, in tandem with wandb for sweeping. For a sweeping configuration experiments/my_sweep.yaml, run:

wandb sweep experiments/my_sweep.yaml

for which wandb responds with:

wandb: Creating sweep from: experiments/my_sweep.yaml
wandb: Creating sweep with ID: <my_sweep_id>
wandb: View sweep at: https://wandb.ai/<my_wandb_team>/<my_project>/sweeps/<my_sweep_id>

Sweeping locally

Run sweep agent with: wandb agent <my_wandb_team>/<my_project>/<my_sweep_id>.

Sweeping with slurm

sbatch files format pre-configured for the Vaughan cluster. Edit the templates at will.

We execute a script to replace the wandb agent ... line in our .slrm files:

./experiments/replace_wandb_agent.sh "wandb agent <my_wandb_team>/<my_project>/<my_sweep_id>"

Finally, spam jobs on the cluster and maximize your allocation per qos:

./experiments/sbatch_all.sh

Edit this script per your allocation.

Usage and Tutorials

Coming soon.

Citation

Coming soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bayesian_dpddm-1.0.4.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bayesian_dpddm-1.0.4-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file bayesian_dpddm-1.0.4.tar.gz.

File metadata

  • Download URL: bayesian_dpddm-1.0.4.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for bayesian_dpddm-1.0.4.tar.gz
Algorithm Hash digest
SHA256 914caedb7840490d2d5aa9f347ae175e8e3efc639f0f06d57feedde53f0e2e15
MD5 4454f21e14ceec24199e3803d278361b
BLAKE2b-256 565001f9550cb7eb157a7e7fb1d88b6e1ade0e3c3fa824ecee4db9adb08475f4

See more details on using hashes here.

File details

Details for the file bayesian_dpddm-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: bayesian_dpddm-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for bayesian_dpddm-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 961ec77574158e8195f6c37f0e06a45d0a071129f7cdafae5f2576c16916536e
MD5 6c6c6a282bc80f14a7db21a50ae50157
BLAKE2b-256 a6aa3b5a15b5293ad74bae0f6b40b4792a0f78fc1598d93bc00ec74602230b6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page