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)
Is this related to the warning I'm getting:
"The method <bound method TensorDictBase.load_memmap_ of [...] wasn't explicitly implemented for tensorclass. This fallback will be deprecated in future releases because it is inefficient and non-compilable. Please raise an issue in tensordict repo to support this method!"?
I'm getting this when saving a replay_buffer which has (custom) Tensorclasses in it.
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: