Skip to content

Fixed convnext tests and nnx warnings#135

Merged
jenriver merged 2 commits intojax-ml:mainfrom
vfdev-5:fix-deprwarnings-nnx-state-to-pure-state
Jan 22, 2026
Merged

Fixed convnext tests and nnx warnings#135
jenriver merged 2 commits intojax-ml:mainfrom
vfdev-5:fix-deprwarnings-nnx-state-to-pure-state

Conversation

@vfdev-5
Copy link
Member

@vfdev-5 vfdev-5 commented Jan 21, 2026

In this PR fixed the following problem:

  1. nnx.Variable.value is deprecated (DeprecationWarning: '.value' access is now deprecated. For Variable[Array] instances use: variable[...] ...) -> replaced with x[...] in convnext (I haven't searched for other .value usages in the whole codebase)

  2. state.to_pure_state() is deprecated (DeprecationWarning: flax.nnx.Statewill be deprecated and be replaced by the built-in Python dict. Please use the equivalentnnx.to_pure_dict instead.) -> replaced by nnx.to_pure_state(state)

  3. error torch.tensor(jax_array) in convnext (TypeError: the read only flag is not supported, should always be False) -> we have to pass by numpy array as in other tests: torch.tensor(np.asarray(jax_array))

  4. added missing keras_hub to test-env deps in pyproject.toml

@vfdev-5 vfdev-5 force-pushed the fix-deprwarnings-nnx-state-to-pure-state branch from 6ee6ea7 to 8f4f2b2 Compare January 21, 2026 18:22
@vfdev-5 vfdev-5 force-pushed the fix-deprwarnings-nnx-state-to-pure-state branch from 8f4f2b2 to 21fb325 Compare January 21, 2026 18:26
Copy link
Member

@jenriver jenriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for the update here!

@jenriver jenriver merged commit f42c172 into jax-ml:main Jan 22, 2026
3 checks passed
@vfdev-5 vfdev-5 deleted the fix-deprwarnings-nnx-state-to-pure-state branch January 26, 2026 08:15
Mozoltov821 pushed a commit to Mozoltov821/bonsai that referenced this pull request Feb 3, 2026
Co-authored-by: Jen Ha <25069493+jenriver@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants