Skip to content

Commit

Permalink
Split ONNXParser from MarabouONNXNetwork in preparation for repla…
Browse files Browse the repository at this point in the history
…cing with C++ implementation (#745)
  • Loading branch information
MatthewDaggitt authored Feb 16, 2024
1 parent 727fba4 commit 73927a8
Show file tree
Hide file tree
Showing 13 changed files with 1,985 additions and 1,857 deletions.
43 changes: 30 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
# Changelog

## Next Release
* Added support for ONNX networks with tanh nodes to command-line interface
* Added proof producing versions of Sign, Max, Absolute Value and Disjunction constraints
* Added support for properties provided in VNN-LIB format for ONNX networks via the Python API
* Fixed bugs when parsing Sigmoid layers in the C++ ONNX parser.
* Supported additional non-linear constraints Softmax and Bilinear
* Removed dependency on torch and drop support for Python3.7
* Bumped ONNX version to >= 1.15.0
* Added support for Leaky ReLU
* Added support for Pythonic API
* Command-line ONNX parser now supports networks with multiple outputs.
* Command-line ONNX parser now supports the following operators: Cast, Squeeze, LeakyRelu.
* Errors now are printed on `stderr` rather than `stdout`
* Not reindexing output variables to immediately follow after input variables in the MarabouNetworkONNX class

* Dependency changes:
- Dropped support for Python 3.7
- Now use ONNX 1.15.0 (up from 0.12.0) in both C++ and Python backends.
- The class `MarabouONNXNetwork` no longer depends on `torch` in Python backend.

* Marabou now prints errors on `stderr` rather than `stdout`

* Added proof producing versions of `Sign`, `Max`, `Absolute Value` and `Disjunction` constraints.

* Changes to command-line ONNX support:
- Fixed bug with variable lower bounds not being set correctly.
- Fixed bug with sigmoid operators not being parsed correctly.
- Added support for `Tanh`, `Squeeze`, `LeakyRelu` and `Cast` operators.
- Added support for networks with multiple outputs

* Added command-line support for properties in the VNNLIB format.

* Changes to Python ONNX support:
- Added support for `Softmax`, `Bilinear` and `LeakyRelu` operators.
- `MarabouONNXNetwork` no longer exposes the fields `madeGraphEquations`, `varMap`, `constantMap`, `shapeMap`
as these were supposed to be internal implementation details.
- `MarabouONNXNetwork` no longer has a `shallowCopy` method. Instead of calling this method,
you should set the new parameter `preserveExistingConstraints` in the method `readONNX` to
`True` which has the same effect.
- The method `getMarabouQuery` on `MarabouNetwork` has been renamed `getInputQuery`.

* Added support for creating constraints using the overloaded syntax `<=`, `==` etc. in
the Python backend. See `maraboupy/examples/7_PythonicAPI.py` for details.

## Version 1.0.0

* Initial versioned release
2 changes: 1 addition & 1 deletion maraboupy/Marabou.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
try:
from maraboupy.MarabouNetworkONNX import *
except ImportError:
warnings.warn("ONNX parser is unavailable because onnx or onnxruntime or torch packages are not installed")
warnings.warn("ONNX parser is unavailable because onnx or onnxruntime packages are not installed")

def read_nnet(filename, normalize=False):
"""Constructs a MarabouNetworkNnet object from a .nnet file
Expand Down
Loading

0 comments on commit 73927a8

Please sign in to comment.