Program generator dose'nt work for convert onnx file to scala
ISOsamuYabuta opened this issue · 3 comments
process which convert onnx file to scala was failed When i execute "run [xxxx].onnx" on programGeneratorJVM .
How can i fix?
[Error]
[error] (run-main-2) java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to java.lang.String
[error] java.lang.ClassCastException: scala.collection.immutable.$colon$colon cannot be cast to java.lang.String
[error] at org.emergentorder.onnx.ONNXProgramGenerator$.$anonfun$main$17(ONNXProgramGenerator.scala:199)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237)
[error] at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
[error] at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
[error] at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:237)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:230)
[error] at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:198)
[error] at org.emergentorder.onnx.ONNXProgramGenerator$.$anonfun$main$6(ONNXProgramGenerator.scala:194)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237)
[error] at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)
[error] at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
[error] at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:237)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:230)
[error] at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:198)
[error] at org.emergentorder.onnx.ONNXProgramGenerator$.fullSource$1(ONNXProgramGenerator.scala:155)
[error] at org.emergentorder.onnx.ONNXProgramGenerator$.generate$1(ONNXProgramGenerator.scala:296)
[error] at org.emergentorder.onnx.ONNXProgramGenerator$.main(ONNXProgramGenerator.scala:303)
[error] at org.emergentorder.onnx.ONNXProgramGenerator.main(ONNXProgramGenerator.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
If you could tell me which model you are using it would help. If you can't share it, perhaps you could reproduce on a publicly available model.
Thanks for your interest in the project!
I m really glad your response.
I tested onnx-scala with model that was made by data scientist of my company and it has not been published from the first.
I uploaded that one to s3 for our system and you can download it now from here.
please check it and thanks.
I tried the model you shared, and after some fixes, was able to generate Scala source from it.
Give it another try after pulling the latest.
In terms of running the model, the ONNX ops you are using are not supported yet.
I'm working on expanding the list of supported ops, but it will take some time. If you could add the ops you need and issue a PR, that would be great.