Skip to content
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

[js] Make error friendly when isOrtFormat is undefined #19958

Conversation

sevenc-nanashi
Copy link
Contributor

@sevenc-nanashi sevenc-nanashi commented Mar 17, 2024

Description

Make error friendly when isOrtFormat is undefined (onnxruntime.InferenceSession.create is called with ArrayBuffer or Uint8Array).

Motivation and Context

I was trying to run my onnx model in WebGL EP, but it gave me the error "Cannot read properties of null (reading 'irVersion')".
I used debugger to find that actual error is int64 is not supported, but the error was invisible for me.
So I made it to show both error when isOrtFormat is undefined.
I haven't written unit test yet, so I'm making it draft. (I have no idea about how do I test this though...) d62d942

@sevenc-nanashi sevenc-nanashi changed the title Improve: Make error friendly when isOrtFormat is undefined [js (web)] Make error friendly when isOrtFormat is undefined Mar 17, 2024
@sevenc-nanashi sevenc-nanashi changed the title [js (web)] Make error friendly when isOrtFormat is undefined [js] Make error friendly when isOrtFormat is undefined Mar 17, 2024
js/web/lib/onnxjs/model.ts Outdated Show resolved Hide resolved
fs-eire
fs-eire previously approved these changes Mar 18, 2024
Copy link
Contributor

@fs-eire fs-eire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me.

fs-eire
fs-eire previously approved these changes Mar 18, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Mar 18, 2024

/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

@fs-eire
Copy link
Contributor

fs-eire commented Mar 18, 2024

/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-binary-size-checks-ci-pipeline,Big Models,Android CI Pipeline

@fs-eire
Copy link
Contributor

fs-eire commented Mar 18, 2024

/azp run iOS CI Pipeline,ONNX Runtime React Native CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

2 similar comments
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sevenc-nanashi sevenc-nanashi marked this pull request as ready for review March 18, 2024 00:57
@sevenc-nanashi
Copy link
Contributor Author

@microsoft-github-policy-service agree

@sevenc-nanashi sevenc-nanashi requested a review from fs-eire March 20, 2024 00:20
@fs-eire
Copy link
Contributor

fs-eire commented Mar 20, 2024

/azp run ONNX Runtime Web CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@fs-eire
Copy link
Contributor

fs-eire commented Mar 25, 2024

@sevenc-nanashi in case you missed it: the pipeline failed because files are not correctly formatted.

@sevenc-nanashi
Copy link
Contributor Author

Oops I missed it, sorry.

@fs-eire
Copy link
Contributor

fs-eire commented Mar 26, 2024

/azp run ONNX Runtime Web CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@fs-eire
Copy link
Contributor

fs-eire commented Mar 27, 2024

/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

@fs-eire
Copy link
Contributor

fs-eire commented Mar 27, 2024

/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-binary-size-checks-ci-pipeline,Big Models,Android CI Pipeline

@fs-eire
Copy link
Contributor

fs-eire commented Mar 27, 2024

/azp run iOS CI Pipeline,ONNX Runtime React Native CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

2 similar comments
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@fs-eire fs-eire merged commit ca465dc into microsoft:main Mar 27, 2024
45 checks passed
TedThemistokleous pushed a commit to TedThemistokleous/onnxruntime that referenced this pull request May 7, 2024
### Description
Make error friendly when isOrtFormat is undefined
(`onnxruntime.InferenceSession.create` is called with ArrayBuffer or
Uint8Array).

### Motivation and Context
I was trying to run my onnx model in WebGL EP, but it gave me the error
"Cannot read properties of null (reading 'irVersion')".
I used debugger to find that actual error is `int64 is not supported`,
but the error was invisible for me.
So I made it to show both error when isOrtFormat is undefined.
<s>I haven't written unit test yet, so I'm making it draft. (I have no
idea about how do I test this though...)</s>
[d62d942](microsoft@d62d942)
siweic0 pushed a commit to siweic0/onnxruntime-web that referenced this pull request May 9, 2024
### Description
Make error friendly when isOrtFormat is undefined
(`onnxruntime.InferenceSession.create` is called with ArrayBuffer or
Uint8Array).

### Motivation and Context
I was trying to run my onnx model in WebGL EP, but it gave me the error
"Cannot read properties of null (reading 'irVersion')".
I used debugger to find that actual error is `int64 is not supported`,
but the error was invisible for me.
So I made it to show both error when isOrtFormat is undefined.
<s>I haven't written unit test yet, so I'm making it draft. (I have no
idea about how do I test this though...)</s>
[d62d942](microsoft@d62d942)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants