Skip to content

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Jun 24, 2025

What does this PR do?

According to an internal discussion about Optimizer state serialization:

optimizer_state = nnx.state(optimizer, nnx.optimizer.OptState)

we should simplify this to nnx.OptState

In this PR a minor change, exposing nnx.optimizer.OptState as nnx.OptState:

>>> import flax.nnx as nnx
>>> nnx.OptState
<class 'flax.nnx.training.optimizer.OptState'>

@vfdev-5 vfdev-5 requested a review from cgarciae June 24, 2025 07:52
@copybara-service copybara-service bot merged commit 0b9bb4e into main Jun 24, 2025
19 checks passed
@copybara-service copybara-service bot deleted the add branch June 24, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants