Add node_determinism to OpSchema type stubs - #1
Open
strimo378 wants to merge 1 commit into
Open
Conversation
The OpSchema binding already exposes the node_determinism property, the node_determinism keyword argument of the constructor, and the Python-side non_deterministic convenience property, but none of them were declared in the defs.pyi type stubs. Add them so type checkers and IDEs can see the determinism query interface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QpYnitZpNfAkgkLb1o81NS Signed-off-by: Claude <noreply@anthropic.com>
strimo378
force-pushed
the
claude/operator-randomness-property-s37h7y
branch
from
July 5, 2026 23:00
bcd6106 to
795a115
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
OpSchemananobind binding already exposes thenode_determinismproperty, thenode_determinismkeyword argument of the constructor, and the Python-sidenon_deterministicconvenience property, but none of them were declared in thedefs.pyitype stubs — only theNodeDeterminismenum itself was. This adds the missing declarations so type checkers (mypy/pyright) and IDEs can see the determinism query interface.Motivation and Context
The runtime interface exists and is tested in
onnx/test/schema_test.py, but was invisible to static type checkers because the stubs were not updated. Verified with a local build (schema test suite passes: 37 passed) andruff check/ruff format.The documentation part (showing determinism on the generated operator pages) has been split out into PR #4.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QpYnitZpNfAkgkLb1o81NS