Skip to content

[Feature Request] Document get_sub_tensordict in the TensorDict tutorial #350

@vmoens

Description

@vmoens

Motivation

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions