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
We can easily save tensordicts using torchsnapshot. However, as MemmapTensors store a file on disk, it would be fairly easy to save a tensordict that contains only MemmapTensors (is_memmap() returns True).
Ideally, the saved tensordict structure would follow the one of the original tensordict (+ metadata)
Motivation
We can easily save tensordicts using
torchsnapshot
. However, asMemmapTensors
store a file on disk, it would be fairly easy to save a tensordict that contains only MemmapTensors (is_memmap()
returnsTrue
).Ideally, the saved tensordict structure would follow the one of the original tensordict (+ metadata)
would result in
(we'd need metadata for each subtensordict since they may have a different device / batch_size).
Loading from such file would also be easy (and would not create a copy):
This should work for tensordict and tensorclass, but a little extra work may be needed for the latter.
@sreevasthav
The text was updated successfully, but these errors were encountered: