Skip to main content

No project description provided

Project description

vnnlib

PyPI - Version PyPI - Python Version


A python package for parsing neural network properties in the VNN-LIB format. It should currently parse a superset of the VNN-LIB spec supported by example parser written by Stan Bak for VNN-COMP, and will produce compiled specs in the same format. Additionally, we allow parsing of gzip, bzip2, and lzma compressed specs.

Our parser is currently slower than the previous scripts due to the increased specification support. However, we expect significant optimization opportunities are available, and that overhead will decrease over time.

This package is still alpha software and APIs other than the compatibility API may change before the first release. We hope to have a stable release out before or during the benchmark proposal phase of VNN-COMP 2023.

Installation

For the latest stable version, you can install from PyPI with:

pip install vnnlib

PyPI currently only has pre-releases of vnnlib. To install a pre-release version, add the --pre option to the above command.

For the latest updates of vnnlib, you can pip install directly from the GitHub repo with:

pip install git+https://github.com/dlshriver/vnnlib.git@main

Usage

This package can be used as a drop-in replacement for the VNN-COMP utility script by importing

from vnnlib.compat import read_vnnlib_simple

wherever you previously imported read_vnnlib_simple.

Standalone

The parser can also be used to compile vnnlib ahead of time to reduce future property read times. The result of parsing will be pickled and saved to the location specified.

python -m vnnlib [FILE] --compat -o [OUTPUTFILE]

License

vnnlib is distributed under the terms of the MIT license.

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

vnnlib-0.0.1a2.tar.gz (10.9 kB view hashes)

Uploaded Source

Built Distribution

vnnlib-0.0.1a2-py3-none-any.whl (10.6 kB view hashes)

Uploaded Python 3

Supported by

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