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
TensorDict.get_sub_tensordict() is quite useful when working with indexed memmap tensors (as they do no share storage as torch.Tensor do). However, this is currently not documented in the TensorDict tutorial. Since it is not the default behaviour of __getitem__ since #340, this should be properly documented.
The description of the feature should include:
Indexing with torch.Tensors while keeping the same storage
Indexing tensordicts that contain memmap tensors
Besides, the places in the tests where get_sub_tensordict is used should be also commented.
We could consider moving this to an "advanced" tensordict tutorial section, since this is a feature that most users may not be interested in.