Skip to main content

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!

Metadata

Release files for wandbmon 0.1.0

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

Source distribution (sdist)

Source distribution for wandbmon 0.1.0
File Size Uploaded
wandbmon-0.1.0.tar.gz 12.7 kB Details

Built distribution (wheel)

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

Total release size: 23.9 kB

Release files / wandbmon-0.1.0.tar.gz

Download URL wandbmon-0.1.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5509b6a76a563e2a06b10acaa8f27a1ae4bc46ff578eec7d60da107ecf0db660
BLAKE2b-256 checksum
How to use checksums
ab12c9e1ade0b8a761f8741b31e698669d42b0897093311ae0f050639babb523
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Release files / wandbmon-0.1.0-py3-none-any.whl

Download URL wandbmon-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53e26030f95c2d5bfbe1dd2d86345ff8400b5c0f12742f14a98af3e38097834a
BLAKE2b-256 checksum
How to use checksums
125c2407a1a2afb7f3fa3c5d2774bb55d5c023e2b81114c029f8fa815411881c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.15

Release history Release notifications | RSS feed

This release

0.1.0 This release

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