Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Improvements to LazyStackedTensorSpec, LazyStackedCompositeSpec #969

Open
4 tasks
tcbegley opened this issue Mar 15, 2023 · 0 comments
Open
4 tasks
Assignees
Labels
enhancement New feature or request

Comments

@tcbegley
Copy link
Contributor

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
  • [Feature] Contiguous stacking of matching specs #960 changed the behaviour of torch.stack to 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__
  • project
  • is_in
  • encode (not relevant, should be removed)
  • __iter__
  • __setitem__

LazyStackedCompositeSpec

  • update
  • __eq__
  • __len__
  • project
  • is_in
  • type_check
  • encode
  • __delitem__
  • __iter__
  • __setitem__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants