Skip to content

Improve treedef #3

Description

@janosg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions