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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to