Add optional operator labels for more diagnosable error messages#742
Merged
fdwr merged 8 commits intowebmachinelearning:mainfrom Jul 30, 2024
inexorabletash:label
Merged
Add optional operator labels for more diagnosable error messages#742fdwr merged 8 commits intowebmachinelearning:mainfrom inexorabletash:label
fdwr merged 8 commits intowebmachinelearning:mainfrom
inexorabletash:label
Conversation
This adds an internal 'label' property to the operators that are created as a graph is constructed, which MAY (in the RFC 2119 sense) be used by implementations in async error messages. Developers populate this via a 'label' member in the options dictionary for MLGraphBuilder methods. A new MLOperatorOptions dictionary is defined, and all existing options dictionaries now inherit from this, and all relevant methods now take an options dictionary. Fixes #585
Contributor
Author
|
@lisa0314 and @philloooo - can you do an initial review to ensure this matches the Chromium prototype? |
philloooo
approved these changes
Jul 25, 2024
Contributor
philloooo
left a comment
There was a problem hiding this comment.
Overall it matches with current implementation 👍
|
LGTM. 👍 |
Contributor
Author
|
Thank you @lisa0314 & @philloooo ! Editors - @huningxin & @fdwr - could you please review and merge when ready? |
fdwr
approved these changes
Jul 26, 2024
Collaborator
fdwr
left a comment
There was a problem hiding this comment.
👍 Oof, looks like no fancy regex saves you here 🥲. Thank you JB for making WebNN more debuggable.
Co-authored-by: Dwayne Robinson <[email protected]>
fdwr
approved these changes
Jul 27, 2024
Contributor
Author
|
please merge when ready! |
fdwr
approved these changes
Jul 28, 2024
guschmue
pushed a commit
to microsoft/onnxruntime
that referenced
this pull request
Jul 29, 2024
In order to provide more diagnosable error messages for developers. Spec change: webmachinelearning/webnn#742
github-actions bot
added a commit
that referenced
this pull request
Jul 30, 2024
SHA: 8734bea Reason: push, by fdwr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
rohan11235813
pushed a commit
to quadric-io/onnxruntime
that referenced
this pull request
Aug 19, 2025
In order to provide more diagnosable error messages for developers. Spec change: webmachinelearning/webnn#742
rohan11235813
pushed a commit
to quadric-io/onnxruntime
that referenced
this pull request
Sep 15, 2025
In order to provide more diagnosable error messages for developers. Spec change: webmachinelearning/webnn#742
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an internal 'label' property to the operators that are created as a graph is constructed, which MAY (in the RFC 2119 sense) be used by implementations in async error messages. Developers populate this via a 'label' member in the options dictionary for MLGraphBuilder methods.
A new MLOperatorOptions dictionary is defined, and all existing options dictionaries now inherit from this, and all relevant methods now take an options dictionary.
This is based on the Chromium prototype by @lisa0314
Fixes #585
Preview | Diff