Skip to content

Add node_determinism to OpSchema type stubs - #1

Open
strimo378 wants to merge 1 commit into
mainfrom
claude/operator-randomness-property-s37h7y
Open

Add node_determinism to OpSchema type stubs#1
strimo378 wants to merge 1 commit into
mainfrom
claude/operator-randomness-property-s37h7y

Conversation

@strimo378

@strimo378 strimo378 commented Jul 4, 2026

Copy link
Copy Markdown

The OpSchema nanobind 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 — only the NodeDeterminism enum 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) and ruff 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

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 strimo378 changed the title Add node_determinism to OpSchema type stubs Expose operator determinism in type stubs and generated docs Jul 4, 2026
@strimo378
strimo378 force-pushed the claude/operator-randomness-property-s37h7y branch from bcd6106 to 795a115 Compare July 5, 2026 23:00
@strimo378 strimo378 changed the title Expose operator determinism in type stubs and generated docs Add node_determinism to OpSchema type stubs Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants