NamedTuples support in pytorch

I am trying to figure out the general approach of the pytorch framework towards namedtuples.
From what I was able to find online, it seems like its partially supported and more and more of pytorch capabilities are extended to support the python named tuples.

I am trying to understand what is the vision of pytorch regarding this, is it some kind of a secondary dtype to be supported that will mostly be lagging behind new features? Or instead this would become a standard for future features and optimizations?

I am at an intersection, before committing to the namedtuples (which have great value for me) in my code, I want to understand where do the winds blow and what to expect.
Is there some official pytorch representative that can answer such a question?


any hint will be highly appreciated, anyone?

IMHO, your question makes no sense - named tuples are ad-hoc containers and you’re free to use them as you want while programming models, but there is very little use for them in ML framework interfaces (e.g. sort() returns named tuples, but then - so what).

if you rather want to replace tensors with tensor groups, there is experimental nestedtensor project, can’t comment on its state or usefulness.

Thanks for the answer, however it doesn’t answer the question. We can discuss the usefulness of named tuples. However, I am not asking about that.
thanks for the input anyway

you need to better explain what you want then, perhaps with a code snippet