Skip to content

Conversation

iksnagreb
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 70.06%. Comparing base (f5b58e0) to head (1ed42ab).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
onnxscript/optimizer/_constant_folding.py 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2514      +/-   ##
==========================================
- Coverage   70.07%   70.06%   -0.01%     
==========================================
  Files         215      215              
  Lines       25831    25841      +10     
  Branches     2596     2599       +3     
==========================================
+ Hits        18100    18105       +5     
- Misses       6833     6837       +4     
- Partials      898      899       +1     

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

@justinchuby justinchuby enabled auto-merge (squash) August 27, 2025 19:24
@justinchuby justinchuby merged commit bf1c139 into microsoft:main Aug 27, 2025
23 of 32 checks passed
justinchuby pushed a commit to onnx/ir-py that referenced this pull request Aug 28, 2025
…pi (#169)

Getting the number of bytes in a string tensor needs special treatment
as the STRING data type does not define a bitwidth but needs to be
computed from flattening the strings into a sequence of bytes. See
call_onnx_api querying .nbytes to temporarily remove large initializers.

String initializers need to be converted to bytes via the .string_data
method instead of the .tobytes method in DeduplicateInitializersPass.

Also adds mapping of `np.bytes_` to `STRING` in `DataType.from_numpy`,
which was probably just overlooked before, as object and `np.str_`
(unicode strings) are already handled. This is related to
microsoft/onnxscript#2514

---------

Signed-off-by: Christoph Berganski <[email protected]>
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