#343·einops

[Feature suggestion] Support of tensordict (and tensorclass)

Author: fzimmermann89Created Sep 28, 2024Updated Dec 18, 2024
Labelsfeature suggestion

Tensordicts are dicts of tensors with a common batch dimension, tensorclasses dataclasses of tensor.

https://pytorch.org/tensordict/

Tensordict seems to be still not fully mature, but is already quite useful. If I am not mistaken, it supports most operations required to write a einops backend -- einsum is missing.

Before I (or somebody else) does the work to draft an implementation, I am wondering if this might be included in einops or if @arogozhnikov would either like to wait and see if tensordict gets merged into pytorch proper (https://github.com/pytorch/pytorch/pull/112441) or if the missing einsum functionality would be a stopper.

For us, it would already be immensely helpful to be able to use rearrange on the batch dimensions of tensordicts.

Cheers