Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor documentation fixes for AxisMetadata. #4178

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flax/core/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ class AxisMetadata(Generic[A], metaclass=abc.ABCMeta):
def unbox(self) -> A:
"""Returns the content of the AxisMetadata box.

Note that unlike ``meta.unbox`` the unbox call should recursively unbox
Note that unlike ``meta.unbox`` the unbox call should not recursively unbox
metadata. It should simply return value that it wraps directly even
if that value itself is an instance of AxisMetadata.

In practise, AxisMetadata subclasses should be registered as PyTree nodes to
support passing instances to JAX and Flax APIs. The leaves returned for this
note should correspond to the value returned by unbox.
node should correspond to the value returned by unbox.

Returns:
The unboxed value.
Expand Down
Loading