Closed mcusgithub closed 1 year ago
I actually solved the issue: The problem was with the onnx packages version number. Maybe requirements.txt should be added to the repository to indicate the required version numbers in order to avoid this issue. Thank you.
Note: I'm currently using:
@mcusgithub Thanks for the suggestion! A requirements.txt
has been added.
Thank you for this great utility. Unfortunately, I can't get onnx-modifier to save a model if one or more outputs have been added. Other features work
as expected though (deleting nodes, etc.). To reproduce:
[2023-05-17 12:39:12,355] ERROR in app: Exception on /download [POST] Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "app.py", line 27, in modify_and_download_model onnx_modifier.modify(modify_info) File "/root/onnx-modifier/onnx_modifier.py", line 362, in modify self.add_outputs(modify_info['added_outputs']) File "/root/onnx-modifier/onnx_modifier.py", line 201, in add_outputs shape_info = onnx.shape_inference.infer_shapes(self.model_proto) AttributeError: module 'onnx' has no attribute 'shape_inference'