]> khamidou — GitHub mirrors - safetensors.git/commit
Remove the breaking change of disallowing zero sized tensors. (#221)
authorNicolas Patry <patry.nicolas@protonmail.com>
Thu, 30 Mar 2023 12:58:08 +0000 (14:58 +0200)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2023 12:58:08 +0000 (14:58 +0200)
commitec6fc4a174e822b5bbaed87b617bfabf9a2f71e5
treef08367be34c510cb0e566b998fc05238ddbc0786
parent91c7aa4e06f1b10d9769fae1d883c8f5b6a556a9
Remove the breaking change of disallowing zero sized tensors. (#221)

* Remove the breaking change of disallowing zero sized tensors.

Some files out there might exist with this.
While being questionnable, it's not worth doing a breaking change
since there doesn't seem to be either a security implication
nor a performance hit.

* Full support for zero-sized tensor on torch==1.10

* Adding a nice comment.
bindings/python/py_src/safetensors/torch.py
bindings/python/src/lib.rs
bindings/python/tests/test_flax_comparison.py
bindings/python/tests/test_paddle_comparison.py
bindings/python/tests/test_pt_comparison.py
bindings/python/tests/test_tf_comparison.py
safetensors/src/tensor.rs