-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Deprecate all type casting functions #6639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #6639 +/- ##
==========================================
+ Coverage 57.46% 57.50% +0.03%
==========================================
Files 507 507
Lines 31584 31624 +40
Branches 3046 3046
==========================================
+ Hits 18151 18185 +34
- Misses 12607 12613 +6
Partials 826 826 ☔ View full report in Codecov by Sentry. |
### Description Refactor `to_array` to simplify and fix conversion logic. - The `_to_array` function was renamed back to `to_array`, consolidating with existing logic that leverages custom dtypes. - Created an unpack_4bit helper to unpack packed 4bit dtype data, replacing usage of the 4bit->float32 conversion functions because the original logic was not actually needed. - Removed test skips because bugs were fixed. - Type casting functions for custom dtypes will be marked private in the next PR. Public versions of them will be scheduled for deprecation. (#6639) Users should use other libraries like ml_dtypes for efficient type conversion in numpy. ### Motivation and Context Fix #6604 --------- Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@gramalingam for approval. Thanks! |
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: titaiwangms <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: titaiwangms <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: titaiwangms <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: titaiwangms <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: titaiwangms <[email protected]>
### Description Refactor `to_array` to simplify and fix conversion logic. - The `_to_array` function was renamed back to `to_array`, consolidating with existing logic that leverages custom dtypes. - Created an unpack_4bit helper to unpack packed 4bit dtype data, replacing usage of the 4bit->float32 conversion functions because the original logic was not actually needed. - Removed test skips because bugs were fixed. - Type casting functions for custom dtypes will be marked private in the next PR. Public versions of them will be scheduled for deprecation. (#6639) Users should use other libraries like ml_dtypes for efficient type conversion in numpy. ### Motivation and Context Fix #6604 --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: Andreas Fehlner <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: Andreas Fehlner <[email protected]>
### Description Refactor `to_array` to simplify and fix conversion logic. - The `_to_array` function was renamed back to `to_array`, consolidating with existing logic that leverages custom dtypes. - Created an unpack_4bit helper to unpack packed 4bit dtype data, replacing usage of the 4bit->float32 conversion functions because the original logic was not actually needed. - Removed test skips because bugs were fixed. - Type casting functions for custom dtypes will be marked private in the next PR. Public versions of them will be scheduled for deprecation. (onnx#6639) Users should use other libraries like ml_dtypes for efficient type conversion in numpy. ### Motivation and Context Fix onnx#6604 --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: seungwoo-ji <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like `ml_dtypes` for type conversion. - Additionally turned convert_endian and split_complex_to_pairs into private. This is seen as low risk. - Added typing_extensions as a dependency. This is a common dependency used by python packages as a polyfill for the typing module. --------- Signed-off-by: Justin Chu <[email protected]> Signed-off-by: seungwoo-ji <[email protected]>
Deprecate all type casting functions because they are mere utilities or reference implementations that should not be directly exposed to users. Users should leverage libraries like
ml_dtypesfor type conversion.