You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "gariepyalex (via GitHub)" <gi...@apache.org> on 2024/11/01 14:36:27 UTC
[I] [Bug]: OnnxModelHandlerNumpy broken with latest onnx version [beam]
gariepyalex opened a new issue, #32998:
URL: https://github.com/apache/beam/issues/32998
### What happened?
There is a runtime error when loading a ONNX model with `OnnxModelHandlerNumpy` when using ONNX's latest version:
```python
from apache_beam.ml.inference.onnx_inference import OnnxModelHandlerNumpy
model_handler = OnnxModelHandlerNumpy(
"/tmp/model.onnx" # Also crashed with a remote model URI gs://...
)
```
Here is the error, which happens using the DirectRunner:
```
/3.10.14/lib/python3.10/site-packages/apache_beam/ml/inference/onnx_inference.py", line 119, in load_model
model_proto_bytes = onnx._serialize(model_proto)
AttributeError: module 'onnx' has no attribute '_serialize' [while running 'RunInference/BeamML_RunInference']
```
```
pip freeze | grep onnx
onnx==1.17.0
onnxruntime==1.19.2
pip freeze | grep beam
apache-beam==2.60.0
```
### Issue Priority
Priority: 1 (data loss / total loss of function)
### Issue Components
- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Infrastructure
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnnxModelHandlerNumpy broken with latest onnx version [beam]
Posted by "gariepyalex (via GitHub)" <gi...@apache.org>.
gariepyalex commented on issue #32998:
URL: https://github.com/apache/beam/issues/32998#issuecomment-2454819193
Wow thanks @damccorm for the fast fix!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnnxModelHandlerNumpy broken with latest onnx version [beam]
Posted by "gariepyalex (via GitHub)" <gi...@apache.org>.
gariepyalex commented on issue #32998:
URL: https://github.com/apache/beam/issues/32998#issuecomment-2451986629
The error goes away by downgrading to ONNX 1.14.1 (Aug 2023).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnnxModelHandlerNumpy broken with latest onnx version [beam]
Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on issue #32998:
URL: https://github.com/apache/beam/issues/32998#issuecomment-2452135655
Thanks for calling this out - working on a quick fix here - https://github.com/apache/beam/pull/33000
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug]: OnnxModelHandlerNumpy broken with latest onnx version [beam]
Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm closed issue #32998: [Bug]: OnnxModelHandlerNumpy broken with latest onnx version
URL: https://github.com/apache/beam/issues/32998
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org