onnx icon indicating copy to clipboard operation
onnx copied to clipboard

Makes to_array, from_array support custom numpy dtype, support float16 type in parser

Open xadupre opened this issue 1 year ago • 3 comments

Description

from_array, to_array do not support float 8 types, int4, uint4 bfloat16. It is confusing. Fixes #6152 as well.

xadupre avatar Jun 11 '24 11:06 xadupre

Codecov Report

Attention: Patch coverage is 87.05357% with 29 lines in your changes missing coverage. Please review.

Project coverage is 57.14%. Comparing base (83194ed) to head (622e9c2). Report is 63 commits behind head on main.

Files Patch % Lines
onnx/numpy_helper.py 89.28% 4 Missing and 5 partials :warning:
onnx/reference/custom_element_types.py 27.27% 7 Missing and 1 partial :warning:
onnx/test/reference_evaluator_test.py 20.00% 4 Missing :warning:
onnx/test/test_backend_reference.py 25.00% 2 Missing and 1 partial :warning:
onnx/helper.py 75.00% 1 Missing and 1 partial :warning:
onnx/backend/test/case/node/cast.py 0.00% 1 Missing :warning:
onnx/test/numpy_helper_test.py 97.22% 1 Missing :warning:
onnx/test/parser_test.py 87.50% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6170      +/-   ##
==========================================
+ Coverage   56.95%   57.14%   +0.18%     
==========================================
  Files         506      507       +1     
  Lines       30467    31211     +744     
  Branches     4592     4657      +65     
==========================================
+ Hits        17353    17834     +481     
- Misses      12285    12531     +246     
- Partials      829      846      +17     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 11 '24 11:06 codecov[bot]

Do we want to make custom_element_types.py public? It would be helpful to understand the pros and cons of doing so. (And mention it in the PR description when we make a decision)

justinchuby avatar Jun 12 '24 18:06 justinchuby

Do we want to make custom_element_types.py public? It would be helpful to understand the pros and cons of doing so. (And mention it in the PR description when we make a decision)

The types defined here are returned by to_array. Why not making them public?

xadupre avatar Jun 13 '24 08:06 xadupre