Skip to content

Extend graph construction utility#2842

Merged
gramalingam merged 4 commits intomainfrom
rama/build-utility
Mar 5, 2026
Merged

Extend graph construction utility#2842
gramalingam merged 4 commits intomainfrom
rama/build-utility

Conversation

@gramalingam
Copy link
Collaborator

  • The subgraph construction utility extended to allow specification of input/output names as well (optionally).
  • The to_ir method renamed to to_ir_type_and_shape in TensorType (for more robust duck-typing/protocol typing)

gramalingam and others added 4 commits March 4, 2026 09:55
Add OpBuilder to __all__ and import it from _internal.builder
in the top-level onnxscript package.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…graph

- Extract core subgraph-building logic into module-level build_graph()
- Rename input_types/output_types params to inputs/outputs
- Accept dict (named) or list (auto-named) for inputs/outputs
- Rename TensorType.to_ir() to to_ir_type_and_shape()
- Use duck typing in _resolve_type_spec with return type validation
- Update docs and tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…graph

- Extract core subgraph-building logic into module-level build_graph()
- Rename input_types/output_types params to inputs/outputs
- Accept dict (named) or list (auto-named) for inputs/outputs
- Rename TensorType.to_ir() to to_ir_type_and_shape()
- Use duck typing in _resolve_type_spec with return type validation
- Update docs and tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.81%. Comparing base (3f5a3c3) to head (bfd7356).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
onnxscript/_internal/builder.py 93.93% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2842      +/-   ##
==========================================
+ Coverage   71.78%   71.81%   +0.03%     
==========================================
  Files         239      239              
  Lines       29014    29054      +40     
  Branches     2863     2866       +3     
==========================================
+ Hits        20827    20865      +38     
- Misses       7216     7217       +1     
- Partials      971      972       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-project-automation github-project-automation bot moved this from Todo to Done in ONNX Script Review Board Mar 5, 2026
@gramalingam gramalingam merged commit bab4f28 into main Mar 5, 2026
29 of 33 checks passed
@gramalingam gramalingam deleted the rama/build-utility branch March 5, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants