tensordict
tensordict is a dict[str, torch.Tensor] that behaves like one tensor, so indexing, reshaping, stacking, moving to a device, saving, and torch.compile apply to every tensor at once. TensorClass does the same for a class with typed fields and methods.