You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTE: I'm labelling with Web because there is currently no label for 'Node', but it shares the same base of 'common'.
This is specifically for an electron project.
Inferencing large amounts of data is a CPU heavy process, and should be run in a worker thread. The current onnxruntime-node package runs well in the node main process. However, when trying to use onnxruntime-node in a node worker, it cannot find the necessary backend.
Uncaught Exception:
Error: no available backend found. ERR: [cpu] backend not found.
at resolveBackendAndExecutionProviders (file:///Users/onnx-worker-error/out/main/onnx.worker-Dqm3O3Aq.js:54:11)
at async InferenceSession.create (file:///Users/onnx-worker-error/out/main/onnx.worker-Dqm3O3Aq.js:999:48)
To further add to the confusion, when using other libraries like Transformers.js, we have no problem running ONNX in a WebWorker. So it seems to be something with how node is interacting with onnxruntime.
I'm not sure why onnx isn't able to be run in a worker, and after many attempts and fails, I've been able to reproduce this bug in an example repo, and would love some help figuring out the root cause.
Describe the issue
NOTE: I'm labelling with Web because there is currently no label for 'Node', but it shares the same base of 'common'.
This is specifically for an electron project.
Inferencing large amounts of data is a CPU heavy process, and should be run in a worker thread. The current onnxruntime-node package runs well in the node main process. However, when trying to use onnxruntime-node in a node worker, it cannot find the necessary backend.
Here's exactly how I'm implementing it:
To further add to the confusion, when using other libraries like Transformers.js, we have no problem running ONNX in a WebWorker. So it seems to be something with how node is interacting with onnxruntime.
I'm not sure why onnx isn't able to be run in a worker, and after many attempts and fails, I've been able to reproduce this bug in an example repo, and would love some help figuring out the root cause.
Thank you very very much in advance.
To reproduce
Example Repo:
https://github.com/tsekiguchi/onnx-worker-error
To install, follow the read me.
Then run
npm run dev
.Use buttons to test inferencing for node and for a worker.
Urgency
Medium Urgency. I'm going to use in the main process for now, but I think it's important that ONNX runtime is capable of running in a worker.
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.20.1
Execution Provider
Other / Unknown
The text was updated successfully, but these errors were encountered: