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

Improve treedef #3

Open
2 tasks
janosg opened this issue Jan 26, 2022 · 1 comment
Open
2 tasks

Improve treedef #3

janosg opened this issue Jan 26, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@janosg
Copy link
Member

janosg commented Jan 26, 2022

Problem

The JAX treedef contains more information. Therefore, their tree_unflatten function does not need an is_leaf argument. The same way we could make the registry argument unnecessary.

This is not just more convenient. It reduces error potential because the unflattening will automatically use the same options as the flattening.

To-Do

  • Come up with better Treedef (namedtuple or Class) and implement it
  • Adjust interface of tree_unflatten.
@janosg
Copy link
Member Author

janosg commented Feb 26, 2022

The usage of treedef in tree_transpose shows a few useful attributes that we should also have.

@tobiasraabe tobiasraabe added the enhancement New feature or request label May 11, 2022
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