You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: colossalai/utils/safetensors.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
# a python safetensors serializer modified from https://github.com/huggingface/safetensors/blob/41bd1acf38ad28ac559522d40596c6c802f79453/safetensors/src/tensor.rs#L214
2
2
importjson
3
+
importwarnings
3
4
fromdataclassesimportasdict, dataclass
4
5
fromtypingimportDict, List, Optional, Tuple
5
6
@@ -8,8 +9,10 @@
8
9
9
10
try:
10
11
fromtensornvme.async_file_ioimportAsyncFileWriter
11
-
exceptModuleNotFoundError:
12
-
raiseModuleNotFoundError("Please install tensornvme to use NVMeOptimizer")
12
+
exceptException:
13
+
warnings.warn(
14
+
"Please install the latest tensornvme to use async save. pip install git+https://github.com/hpcaitech/TensorNVMe.git"
0 commit comments