microsoft / microsoft/onnxruntime
C# Load input node names by index
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
Is your feature request related to a problem? Please describe.
We have an application that uses .ONNX model files provided by clients to perform prediction. Dimensions of each input is defined but names of each input could be different in each model.
In python we can do something like: input_name = sess.get_inputs()[index].name to get the name of each input by its index, however, in C# InferenceSession.InputMetadata is a dictionary, and GetInputName method is private, I don't have an API to get input name by index.
System information
onnxruntime nuget package 1.7.0
Describe the solution you'd like
Make InferenceSession.GetInputName a public method
Describe alternatives you've considered
Create a property in InferenceSession class that stores all input nodes' meta data in the order of their index. In the meantime, add Name property to NodeMetadata class.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the InferenceSession API and its InputMetadata and GetInputName members, then inspect NodeMetadata as the proposed alternative. The change is complete when C# callers can obtain an input name by index for client-provided ONNX models, with behavior consistent with the existing input metadata ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- api, machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100