Skip to content

Address deprecation in fromstring to frombuffer #1386

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hmaarrfk
Copy link

@hmaarrfk hmaarrfk commented Aug 6, 2025

Deprecated since numpy 1.14 according to
numpy/numpy#28254

This should be the correct fix for #1343

And after this is merged, one can likely just revert this #1351

Deprecated since numpy 1.14 according to
numpy/numpy#28254

This should be the correct fix for huggingface#1343

And after this is merged, one can likely just revert this
huggingface#1351
@hmaarrfk
Copy link
Author

hmaarrfk commented Aug 6, 2025

was hoping that the tests could validate this code since I haven't tested it locally. marking this as draft for now.

@hmaarrfk hmaarrfk marked this pull request as draft August 6, 2025 13:04
@hmaarrfk
Copy link
Author

hmaarrfk commented Aug 6, 2025

i guess the larger problem is that tensors could be bfloat16 or something like that.

@hmaarrfk
Copy link
Author

hmaarrfk commented Aug 6, 2025

Seems like this code was taken from
https://github.com/microsoft/onnxconverter-common/blob/master/onnxconverter_common/float16.py#L125

that moved from fromstring to frombuffer 2 months ago in
microsoft/onnxconverter-common#314

@hmaarrfk hmaarrfk marked this pull request as ready for review August 6, 2025 15:22
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.

1 participant