microsoft / microsoft/onnxruntime

IR_VERSION and Opset Versions support via C API

Open
#5,780 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api api:Java feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

Please help to add APIs supporting the reading of "**ONNX_IR_VERSION**" and "**OPSET_VERSIONS**" in C API and OnnxModelMetadata.java.

There are multiple essential version information in onnx models. Using python for example:
```
import onnx
model = onnx.load_model("model.onnx")
model.model_version
model.opset_import
model.ir_version
model.producer_version
```
However, there is only one version information from OnnxModelMetadata.java.
https://github.com/microsoft/onnxruntime/blob/07dc25e9390cf37c043c862de3ab41d266cca695/java/src/main/java/ai/onnxruntime/OnnxModelMetadata.java#L34

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked OnnxModelMetadata.java file and inspect the existing C API metadata entry points. Trace how model metadata is exposed in both APIs and identify the tests covering metadata access. Done means callers can read IR_VERSION and OPSET_VERSIONS in addition to the existing version information.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp, java
Domain
api, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.