Skip to main content

Monitizer is a tool to optimize and evaluate neural network monitors.

Project description

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",
}

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

monitizer-0.0.1.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

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

monitizer-0.0.1-py3-none-any.whl (126.4 kB view details)

Uploaded Python 3

File details

Details for the file monitizer-0.0.1.tar.gz.

File metadata

  • Download URL: monitizer-0.0.1.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for monitizer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 02b9063e5efd0555b4355c6a36731004666dc3092b7b980e0763f052e09a42de
MD5 d54774137006681984e6141bd64c20a3
BLAKE2b-256 76811a23718e3a460924372df77132cdb95e267cd655b6d1c94c06f5aa889310

See more details on using hashes here.

File details

Details for the file monitizer-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: monitizer-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 126.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for monitizer-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 454947708faf4b7ef0c600f0ad91a29c8fb26ec05b8078185212caae55c9819c
MD5 40fe9061c96552eb1baa44975d1a301c
BLAKE2b-256 86ab24822b78ac85d4c72574bb801ab0d204ed64aea4738fc5a5b90e5183d512

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