Skip to main content

A library for monitoring models at inference time

Project description

WandMon

WandMon is a lightweight Python library designed to help you seamlessly monitor the inputs and outputs of your machine learning model in a production environment. Developed by Weights and Biases, it offers the capability to stream the monitoring data directly to your Weights and Biases dashboard.

Wrap any prediction function with a @monitor decorator and WandMon provides real-time tracking of your function calls with minimal interference to your existing pipeline.

Key Features

  • Real-time monitoring: WandMon captures real-time system utilization, call time, and number of calls.
  • Flexibility: Easily specify an input preprocessor or output postprocessor to have more control over what gets logged.
  • Direct logging to Weights and Biases: By default, WandMon logs all keyword arguments.
  • Dashboard integration: WandMon is fully compatible with Weights and Biases' workspaces and integrates with Weave enabling easy analysis and customization.

Installation

You can install WandMon via pip:

pip install -e .

Getting Started

To get started with WandMon, simply import the library and use the @monitor decorator for your function. WandMon will automatically log the inputs and outputs of your function to your Weights and Biases account.

See examples for some getting started examples.

from wandmon import monitor

@monitor
def my_function(a, b, c):
    ...

Once you've set up WandMon, calling my_function will automatically stream its inputs and outputs to Weights and Biases:

my_function(1, 2, 3)

For more control over what data is logged, you can provide an input_preprocessor or output_postprocessor:

def my_input_preprocessor(kwargs):
    return {key: value for key, value in kwargs.items() if key in ["a", "b"]}

def my_output_postprocessor(result):
    return {"result": result}

@monitor(input_preprocessor=my_input_preprocessor, output_postprocessor=my_output_postprocessor)
def my_function(a, b, c):
    ...

Weights and Biases Integration

To view the logged data, visit your Weights and Biases dashboard. The dashboard displays real-time system utilization, call time, and inputs and outputs.

WandMon makes it easier to monitor your production ML models and visualize data to get insights.

Feedback and Contribution

We would love to hear your feedback and are open to contributions. Please feel free to open an issue or send a pull request.

Development

pip install -r requirements.test.txt

License

WandMon is under the Apache 2.0.


Whether you're tracking your models' performance over time, comparing different models, or trying to diagnose the cause of a recent crash, WandMon and Weights and Biases have you covered. Let's get your models monitored, understood, and improved!

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

wandbmon-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

wandbmon-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file wandbmon-0.1.0.tar.gz.

File metadata

  • Download URL: wandbmon-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for wandbmon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5509b6a76a563e2a06b10acaa8f27a1ae4bc46ff578eec7d60da107ecf0db660
MD5 2a307b458ca420e5364b0eedb5c3af38
BLAKE2b-256 ab12c9e1ade0b8a761f8741b31e698669d42b0897093311ae0f050639babb523

See more details on using hashes here.

File details

Details for the file wandbmon-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: wandbmon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for wandbmon-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53e26030f95c2d5bfbe1dd2d86345ff8400b5c0f12742f14a98af3e38097834a
MD5 2a71ce42294f01fd0570d891bfe879ab
BLAKE2b-256 125c2407a1a2afb7f3fa3c5d2774bb55d5c023e2b81114c029f8fa815411881c

See more details on using hashes here.

Supported by

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