microsoft / microsoft/onnxruntime
[Feature Request] Include and expose protobuf serialization / deserialization in the JS interface (ideally in `onnxruntime-common`)
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the feature request
For certain use-cases, I find myself wanting to pass around serialized representations of data efficiently, both for caching and efficient transfer between machines. As such, exposing protobuf-based serialization and deserialization in the JS interfaces, in a manner similar to the helpers from the Python library, would be very beneficial. As-is, there does not seem to be a straightforward way to convert ONNX-serialized objects to their JS interface version, and vice versa, directly in the interface.
### Describe scenario use case
This feature would be very useful for handling short-term and intermediate-term caching of tensor objects during runtime, as well as passing serialized tensors across different machines or environments. This would be particularly useful for cases where passing tensors efficiently between Python and JS environments is required.
Contributor guide
Research direction
Start by reviewing the JS interfaces and the onnxruntime-common area, then compare them with the serialization helpers in the Python library. The issue does not name specific files or tests, so first identify the relevant entry points and existing tensor representations. Done means JS can serialize and deserialize the relevant ONNX objects for caching and transfer between JS and Python environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100