]> khamidou — GitHub mirrors - safetensors.git/commit
Make tensor identifier a bit more robust, and transformers compatible (#264)
authorThomas Wang <24695242+thomasw21@users.noreply.github.com>
Tue, 13 Jun 2023 16:20:19 +0000 (18:20 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2023 16:20:19 +0000 (18:20 +0200)
commit3dab13f0d7d461c9342bb82203b8c826ccb87f7c
tree7defeaa79968ebc34384d5d30fd93518c9b6f511
parentd593c38a1c7c007bc195bea11fabe383b0fa04e1
Make tensor identifier a bit more robust, and transformers compatible (#264)

* Make tensor identifier a bit more robust, and transformers compatible

* Prove that you need to storage storage size as well

* Lint

* Backward compatility for torch version

* Lint

* Fixing tests.

* Test supporting mutliple torch versions.

* Fixing _flatten share pointer detection.

* More code reuse.

* Better error message.

* Attempting to debug what's wrong.

* Fixing torch 1.13... God this is awful.

* Latest python ?

* Dancing with versions.

* ..

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
.github/workflows/python.yml
bindings/python/py_src/safetensors/torch.py
bindings/python/tests/test_pt_comparison.py
bindings/python/tests/test_simple.py