microsoft / microsoft/onnxruntime
[Web] ReferenceError: 'self' is not defined
Open
@fs-eire is already working on this.
Since Sep 6, 2023.
platform:web
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
Describe the issue
When use ort to use pretrained model in browser, throw ReferenceError: 'self' is not defined.
To reproduce
pnpm install onnxruntime-web@1.15.1
then call:
import * as ort from 'onnxruntime-web';
const session = await ort.InferenceSession.create('./best.onnx');
Urgency
is urgent.
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
onnxruntime-web@1.15.1
Execution Provider
'webgl' (WebGL), 'wasm'/'cpu' (WebAssembly CPU)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.