tensorflow / tensorflow/probability
JAX backend doesn't use `jax.tree_util`
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
In this part, expand_composites is set to False and this prevents jax.tree_util for kicking in.
https://github.com/tensorflow/probability/blob/64a70d0850f2ab6b69693b7fb728b7c6eb759a7e/tensorflow_probability/python/internal/backend/numpy/nest.py#L314-L320
The resulting problem is that we cannot use pytree incompatible with dm_tree
Herę is notebook reproducing the bug
https://colab.research.google.com/gist/krzysztofrusek/a9fa71ca2bf3952a9f18358309225107/eqx_tfp.ipynb
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.
Research direction
Start with tensorflow_probability/python/internal/backend/numpy/nest.py at lines 314-320 and run the linked Colab notebook to reproduce the incompatibility with dm_tree. Trace how expand_composites affects tree handling, then verify that the reported pytree case works without breaking the existing nest behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100