ONNX provides support for testing with a backend. We could try and implement a backend in python based on this. For example, this is how Caffe2 implemented it: https://github.com/pytorch/pytorch/blob/main/caffe2/python/onnx/backend.py