[docs]: Improve docs for NNX API Reference
- Dominant language
- Jupyter Notebook
- Stars
- 7.3k
- Forks
- 833
- Avg merge
- 5h 11m
- Merged PRs (30d)
- 5
Description
Hi,
I’d like to improve the NNX API reference docs (not Linen). While working on a smaller docs issue ([#5107](https://github.com/google/flax/issues/5107)), I noticed a few recurring problems across the NNX API reference: incomplete indexing/toctrees, inconsistent Sphinx cross-references vs code formatting, and missing/unclear docstrings for user-facing symbols. Some pages also look copied from older docs and don’t match the current NNX surface.
---
Example:
- `flax.nnx.unflatten` in the graph section has a kwarg `outer_index_outer_ref=None`, but its docstring refers to `index_ref_cache` (which doesn’t exist).
---
To keep review manageable, I’ll do this as a series of small PRs, going section by section in the [API Reference page](https://flax.readthedocs.io/en/latest/api_reference/flax.nnx/index.html). To keep the scope manageable I'll focus on docs + docstrings only (no behavioral changes).
Is it ok if I send small PRs starting with `flax.nnx.graph`?
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.