Skip to main content

Monitizer

We create a tool (Monitizer) that optimizes and evaluates monitors for a neural network (NN) for a specific task.

Documentation

A full documentation is available online at https://monitizer.readthedocs.io/. This also contains setup requirements, an installation guide, a dveloper guide and detailed explanations of the structure of the project.

Installation

Install via pip

pip install monitizer

Install from source

Download the repository:

git clone https://gitlab.com/live-lab/software/monitizer
cd monitizer
pip install .

Note that if you want to debug and change the code run the command pip install -e . to install in development mode!

Finally, decide which ID-datasets you will be using (you can also do this again later) and download the datasets by running:

monitizer --setup <dataset1> ... <datasetN> --data-folder <PATH/TO/DATA>

while replacing <dataset> with the name of a dataset that you intend to use, e.g. ./monitizer --setup MNIST CIFAR10 and <PATH/TO/DATA> with a folder, where you want the raw data to be stored (default is 'data'). This will automatically download all required datasets, including the respective OOD-datasets, that monitizer needs.

A default command for downloading all implemented datasets is:

monitizer --setup ALL --data-folder data

Note that Imagenet must be downloaded after logging in, so Monitizer cannot take this over for you. However, it will tell you, where to download the data and where to put it. Visit https://www.image-net.org/challenges/LSVRC/2012/2012-downloads.php for downloading ILSVRC2012_devkit_t12.tar.gz, ILSVRC2012_img_val.tar, and ILSVRC2012_devkit_t12.tar.gz, and put it in your data folder.

Your first command

Run:

# assuming you are in the directory Monitizer
monitizer --evaluate --monitor-template energy --dataset MNIST --neural-network example-networks/MNIST3x100 --optimize --optimization-objective optimization-objective.ini

It optimizes an Energy monitor (2) on a network called "MNIST3x100", trained on the MNIST dataset. The optimization is random and the resulting monitor is then to be evaluated.

Running Tests

python -m unittest discover -s tests

Lincense

Apache 2.0

Maintainer(s)

Stefanie Mohr

Contributers

Stefanie Mohr

Sudeep Kanav

Marta Grobelna

Muqsit Azeem

Sabine Rieder

Citations

If you use Monitizer, please cite

Azeem, M., Grobelna, M., Kanav, S., Křetínský, J., Mohr, S., Rieder, S. (2024). Monitizer: Automating Design and Evaluation of Neural Network Monitors. In: Gurfinkel, A., Ganesh, V. (eds) Computer Aided Verification. CAV 2024. Lecture Notes in Computer Science, vol 14682. Springer, Cham. https://doi.org/10.1007/978-3-031-65630-9_14

@InProceedings{monitizer,
    author="Azeem, Muqsit
    and Grobelna, Marta
    and Kanav, Sudeep
    and K{\v{r}}et{\'i}nsk{\'y}, Jan
    and Mohr, Stefanie
    and Rieder, Sabine",
    editor="Gurfinkel, Arie
    and Ganesh, Vijay",
    title="Monitizer: Automating Design and Evaluation of Neural Network Monitors",
    booktitle="Computer Aided Verification",
    year="2024",
    publisher="Springer Nature Switzerland",
    pages="265--279",
}

Metadata

Release files for Monitizer 0.0.1

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

Source distribution (sdist)

Source distribution for Monitizer 0.0.1
File Size Uploaded
monitizer-0.0.1.tar.gz 70.0 kB Details

Built distribution (wheel)

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

Total release size: 196.4 kB

Release files / monitizer-0.0.1.tar.gz

Download URL monitizer-0.0.1.tar.gz
Size 70.0 kB
Tags Source
SHA-256 checksum
How to use checksums
02b9063e5efd0555b4355c6a36731004666dc3092b7b980e0763f052e09a42de
BLAKE2b-256 checksum
How to use checksums
76811a23718e3a460924372df77132cdb95e267cd655b6d1c94c06f5aa889310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / monitizer-0.0.1-py3-none-any.whl

Download URL monitizer-0.0.1-py3-none-any.whl
Size 126.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
454947708faf4b7ef0c600f0ad91a29c8fb26ec05b8078185212caae55c9819c
BLAKE2b-256 checksum
How to use checksums
86ab24822b78ac85d4c72574bb801ab0d204ed64aea4738fc5a5b90e5183d512
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.1 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