-
Notifications
You must be signed in to change notification settings - Fork 284
Open
Description
System Info
safetensors==0.7.0
Information
- The official example scripts
- My own modified scripts
Reproduction
Script:
from safetensors.paddle import save_file, load_file
import paddle
t0 = paddle.randn((8, 16), dtype=paddle.float32).to(dtype=paddle.float8_e5m2)
save_file({"t0": t0}, "/tmp/a.safetensors", {})
load_file("/tmp/a.safetensors")
/data/venvs/paddle/lib/python3.12/site-packages/paddle/utils/cpp_extension/extension_utils.py:711: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
warnings.warn(warning_message)
Traceback (most recent call last):
File "/tmp/test.py", line 5, in <module>
load_file("/tmp/a.safetensors")
File "/data/venvs/paddle/lib/python3.12/site-packages/safetensors/paddle.py", line 139, in load_file
flat = numpy.load_file(filename)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/venvs/paddle/lib/python3.12/site-packages/safetensors/numpy.py", line 140, in load_file
result[k] = f.get_tensor(k)
^^^^^^^^^^^^^^^
File "/data/venvs/paddle/lib/python3.12/site-packages/numpy/__init__.py", line 795, in __getattr__
raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
AttributeError: module 'numpy' has no attribute 'float8_e5m2'
Expected behavior
safetensors==0.6.2 did not cause this crash.
Metadata
Metadata
Assignees
Labels
No labels