flax
flax copied to clipboard
Add docstrings to nnx filterlib filter classes
What does this PR do?
The filter classes in flax.nnx.filterlib (WithTag, PathContains, OfType, Any, All, Not, Everything, Nothing) are exported and appear in the NNX API reference but currently render with no docstrings. This adds a docstring to each, with descriptions based on the Filters guide and Attributes: sections for the dataclass filters. Docs only, no behavioral changes.
Part of #5161.
Checklist
- [x] This PR fixes a minor issue (e.g.: typo or small bug) or improves the docs (you can dismiss the other checks if that's the case).
- [x] This change is discussed in a Github issue/discussion (please add a link): #5161
- [x] The documentation and docstrings adhere to the documentation guidelines.
- [ ] This change includes necessary high-coverage tests. (No quality testing = no merge!)
cc @vfdev-5
Rendered docs: https://flax--5474.org.readthedocs.build/en/5474/api_reference/flax.nnx/filterlib.html
@santihdzs please rebase your PR on the main branch to fix the CI, thanks!