-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a react-native test using the android API #12659
Conversation
/azp run ONNX Runtime React Native CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run ONNX Runtime React Native CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline |
/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline |
Azure Pipelines successfully started running 9 pipeline(s). |
Azure Pipelines successfully started running 8 pipeline(s). |
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline |
/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline |
Azure Pipelines successfully started running 8 pipeline(s). |
Azure Pipelines successfully started running 9 pipeline(s). |
Looks like the training pipeline failure was due to a CI VM error, could someone re-run it? |
@fs-eire please could you kick off the orttraining-linux-ci-pipeline? The failure is unrelated to this PR, it looks like the VM filled its disk up. The JNI changes have all been merged in, so this test is the last part of that work. |
/azp run orttraining-linux-ci-pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
...ct_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java
Outdated
Show resolved
Hide resolved
...ct_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java
Outdated
Show resolved
Hide resolved
...ct_native/android/src/androidTest/java/ai/onnxruntime/reactnative/OnnxruntimeModuleTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
I think I made all the requested changes here. Can @yuslepukin or @fs-eire review it again? |
Is this change still applicable and should be checked-in? |
Yes, though it may need rebasing to make it merge cleanly. The tests always passed on Java, this adds tests which did fail on android before the JNI refactor last year and now should not. |
/azp run ONNX Runtime React Native CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
Looks like the react code changed a little around me, so I'll rebase this branch on main and then try to figure out what the test should look like. |
Azure Pipelines successfully started running 8 pipeline(s). |
Azure Pipelines successfully started running 10 pipeline(s). |
Looks like CI was failed. could you try merge to latest main? |
a50c962
to
796e4b1
Compare
/azp run Windows ARM64 QNN CI Pipeline,Windows x64 QNN CI Pipeline,Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline,ONNX Runtime Web CI Pipeline,Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline |
/azp run Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,orttraining-amd-gpu-ci-pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed,onnxruntime-python-checks-ci-pipeline,onnxruntime-binary-size-checks-ci-pipeline,Android CI Pipeline |
/azp run iOS CI Pipeline,ONNX Runtime React Native CI Pipeline |
Azure Pipelines successfully started running 2 pipeline(s). |
Azure Pipelines successfully started running 9 pipeline(s). |
Azure Pipelines successfully started running 10 pipeline(s). |
The react native stuff seems to require a new code formatter now I've rebased. It doesn't appear to be the spotless one used elsewhere in the Java code. I tried to run |
'npm run format' should not apply on 3rd party code which are under node_modules/ folder. Is it complaining code format for external code? |
It's complaining about the Java test file that I modified in this PR under js/react_native. |
you can do either of the following as your preferred
|
I had the wrong clang-format installed, it was hitting the native binary not the node wrapper around it. After installing the node clang-format it fixed a missing space and seems happy now. |
/azp run ONNX Runtime React Native CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
@Craigacp is this change out of date or would still be good to add. Happy to help getting it in if the latter. Wasn't aware of this stale PR. |
I think this test is still good, but I don't have an environment to run react native code so it was tricky for me to test. The Java part I'll pull out and put in another PR. I don't think the bugs it catches are likely anymore, they went away when I completely rewrote the JNI parts to be better at exception handling. The issue with react native was that Android threw the exceptions differently to a JVM in some edge cases and so the errors that came out were weird, but with the JNI rewrite they are identical across platforms (to the best of my knowledge). |
Description:
Adds a test which should trigger #11451 on Android. It also adds the same tests to Java, but those already passed.
I suspect the react tests could be cleaned up more, but I've no idea how they are actually run, or if there can be multiple modules, so someone who better understands how those tests are run should take a look. I don't have an environment setup to allow me to run them locally, though I have checked the new Java side tests.
cc @fs-eire
Motivation and Context