microsoft / microsoft/onnxruntime

[Feature Request] Error code for terminated Session::run

Open
#20,999 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the feature request

Introduce a dedicated OrtErrorCode value for terminated sessions.

Describe scenario use case

When a session run is terminated using the RunOptions::SetTerminate C++ API, Session::run throws a generic error. To distinguish an error from a interrupted run, one must test the error message. It would be more robust to return a dedicated error code.

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 at the RunOptions::SetTerminate and Session::run C++ API entry points, then trace how terminated runs are represented by OrtErrorCode. Define what a dedicated code should cover and verify that interrupted runs return it instead of relying on error-message text.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
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.