Spox - Pythonic framework for building ONNX graphs #5082
jbachurski
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Over the past year we've been developing Spox at QuantCo. It's being used in production for a while now, and it's also open-source. It was built from scratch, primarily using low-level utilities present here in the Python
onnx
package.Spox features a lean API with an emphasis on stability and predictability. You can use it for a variety of tasks revolving around writing ONNX - from experimenting with operators and writing test models, to implementing fully-fledged converter libraries (which is what we use it for). Thanks to
inline
there's also good support for integrating with other ONNX producers.Philosophically, Spox embraces functional principles - especially immutability. Computation is tracked without modifying any mutable state, and as such Spox values can be reused in many contexts without fear of invalidating anything (in particular - no name collisions!). We use ONNX utilities like type & shape inference and run them on the fly to produce useful errors and warnings that happen way before you get to the
ModelProto
. We also have complete support for ONNX control flow (functional-esque).Using Spox is already possible and our 1.0 release is close. We're super excited to see the community start playing around with it, and would be glad to hear any thoughts and answer any questions about it!
Repository: https://github.com/Quantco/spox
Documentation: https://spox.readthedocs.io/en/latest/
Quick start (based on this example in the ONNX docs):
Beta Was this translation helpful? Give feedback.
All reactions