-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add optional operator labels for more diagnosable error messages #742
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 webmachinelearning#585
@lisa0314 and @philloooo - can you do an initial review to ensure this matches the Chromium prototype? |
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.
Overall it matches with current implementation 👍
LGTM. 👍 |
Thank you @lisa0314 & @philloooo ! Editors - @huningxin & @fdwr - could you please review and merge when ready? |
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.
👍 Oof, looks like no fancy regex saves you here 🥲. Thank you JB for making WebNN more debuggable.
Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>
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.
LGTM with a nit
please merge when ready! |
In order to provide more diagnosable error messages for developers. Spec change: webmachinelearning/webnn#742
SHA: 8734bea Reason: push, by fdwr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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