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

[nnx] fix nnx_basics dependencies #3942

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/nnx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Features
.. div:: sd-font-normal

NNX makes it very easy integrate objects with regular JAX code
via the `Functional API <nnx_basics#the-functional-api>`__.
via the `Functional API <nnx_basics.html#the-functional-api>`__.

Basic usage
^^^^^^^^^^^^
Expand Down
13 changes: 13 additions & 0 deletions docs/nnx/nnx_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@
"that have allowed Linen to scale effectively to large codebases."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"skip-execution"
]
},
"outputs": [],
"source": [
"! pip install -U flax penzai"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down
6 changes: 6 additions & 0 deletions docs/nnx/nnx_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ like PyTorch.
Despite its simplified implementation, NNX supports the same powerful design patterns
that have allowed Linen to scale effectively to large codebases.

```{code-cell} ipython3
:tags: [skip-execution]

! pip install -U flax penzai
```

```{code-cell} ipython3
from flax import nnx
import jax
Expand Down
Loading