machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

Load ONNX from in-memory binary instead of file path

Open RamType0 opened this issue 2 years ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe.

Currently, the only way to load ONNX model is to specify concrete file path. But the usage of concrete file path is often impossible in some platforms.(e.g. UWP without permission) Loading ONNX model from in-memory binary representation will solve this problem.

Describe the solution you'd like

Provide API to load ONNX model from ReadOnlyMemory<byte>, Stream.

Additional context

OnnxTransformer has private constructor which accepts byte[] modelBytes.

RamType0 avatar Mar 03 '23 18:03 RamType0

@luisquintanilla I'm going to say we shoudl take this for the next major release. SHouldn't be hard to do. We already have a private constructor that essentially does this and I've already looked into it a bit. If you think we should plan on next year though please bump the milestone out.

michaelgsharp avatar Jan 23 '24 23:01 michaelgsharp

This makes sense to me.

luisquintanilla avatar Jan 24 '24 14:01 luisquintanilla

This would be useful for a project I am working on.

maltempi avatar May 21 '24 18:05 maltempi