[Feature Request] Improvements to LazyStackedTensorSpec, LazyStackedCompositeSpec
Open
@vmoens is already working on this.
Since Mar 15, 2023.
enhancement
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 487
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 207
Description
Motivation
#892 introduced two new classes: LazyStackedTensorSpec, and LazyStackedCompositeSpec. These allow us to stack heterogeneous TensorSpec and CompositeSpec respectively.
These classes are missing a few features that still need to be added.
TODO
- Add documentation - the classes have basic docstrings, but we should add examples etc.
- Add support for nestedtensors
- #960 changed the behaviour of
torch.stackto only return lazy stacks in the heterogenous case. As a result a number of tests now only cover the homogeneous or heterogeneous case but not both. These tests need to be expanded to cover both cases.
Unimplemented methods - the following exist as unimplemented placeholder methods in LazyStackedTensorSpec and LazyStackedCompositeSpec respectively
LazyStackedTensorSpec
-
__eq__(requires unbind?) __len__projectis_inencode(not relevant, should be removed)__iter____setitem__
LazyStackedCompositeSpec
update__eq____len__projectis_intype_checkencode__delitem____iter____setitem__
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.