Skip to content

Conversation

cgarciae
Copy link
Collaborator

@cgarciae cgarciae commented Jul 3, 2025

What does this PR do?

  • Removes VariableState
  • split and state now return States containing existing Variables as leaves.
  • One note here is that these Variables are the existing references and not copies, this means that if you mutate them they'll change the behavior of the object they're extracted from as well.
  • VariableState will be temporarily alias to Variable to allow for instance checks to continue working but a deprecation warning is raised.
  • Variable has a temporary type property to avoid breaking existing code but a deprecation warning is raised.
  • nnx.variables is now an alias of nnx.state as they now have the same behavior (return existing Variables).

@cgarciae cgarciae force-pushed the nnx-remove-variable-state branch 4 times, most recently from 86bc732 to 97b3f2b Compare July 3, 2025 16:29
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@cgarciae cgarciae force-pushed the nnx-remove-variable-state branch 7 times, most recently from 9b7110d to 701d7db Compare July 3, 2025 23:46
@cgarciae cgarciae marked this pull request as ready for review July 3, 2025 23:46
@cgarciae cgarciae force-pushed the nnx-remove-variable-state branch from 701d7db to e8984b7 Compare July 6, 2025 00:24
@copybara-service copybara-service bot merged commit 2e779f5 into main Jul 16, 2025
20 checks passed
@copybara-service copybara-service bot deleted the nnx-remove-variable-state branch July 16, 2025 13:50
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.

1 participant