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
I encounter a similar issue of #164. I try to remove the storage from drive after I loaded. It will give me a permission error on windows unless I add a del to delete the reference to the memory.
tensor = load_tensor(path)[name]
del tensor
os.remove(path) # will work, without del tensor won't work
If I use that tensor somewhere else, deleting the original pointer won't help. It seems like as long as the loaded memory is allocated, the original file on the drive cannot be modified (deleted or overwritten). I believe this should be mentioned somewhere in the documentation.
tensor = load_tensor(path)[name]
a = nn.Parameter(tensor)
del tensor
os.remove(path) # won't work
Information
The official example scripts
My own modified scripts
Reproduction
tensor = load_tensor(path)[name]
del tensor
os.remove(path) # will work, without del tensor won't work
tensor = load_tensor(path)[name]
a = nn.Parameter(tensor)
del tensor
os.remove(path) # won't work
Expected behavior
Discussion on documentation
The text was updated successfully, but these errors were encountered:
System Info
I encounter a similar issue of #164. I try to remove the storage from drive after I loaded. It will give me a permission error on windows unless I add a
del
to delete the reference to the memory.If I use that tensor somewhere else, deleting the original pointer won't help. It seems like as long as the loaded memory is allocated, the original file on the drive cannot be modified (deleted or overwritten). I believe this should be mentioned somewhere in the documentation.
Information
Reproduction
Expected behavior
Discussion on documentation
The text was updated successfully, but these errors were encountered: