google-deepmind / google-deepmind/tree

Explicit way of register classes

Open
#76 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Currently, `chex.assert_xyz` uses `tree` under the hood. This make it impossible to use it with Jax trees (`jax.tree_utils.register`) which do not support `collections.abc.Mapping`.

I have a dataclass which already define `__getitem__`, `__iter__` for numpy-like operation, so I cannot support `collections.abc.Mapping`.
I would like to use it with tree too, so `chex.assert_xyz` works.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.