Skip to content

[docs]: Improve docs for NNX API Reference #5161

@ibbyml

Description

@ibbyml

Hi,

I’d like to improve the NNX API reference docs (not Linen). While working on a smaller docs issue (#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).
Image

To keep review manageable, I’ll do this as a series of small PRs, going section by section in the API Reference page. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions