Skip to content

Commit 6e05d27

Browse files
committed
allow nnx standalone import
1 parent 707a569 commit 6e05d27

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+46
-43
lines changed

docs_nnx/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
doctest_global_setup = """
171171
import jax
172172
import jax.numpy as jnp
173-
from flax import nnx
173+
import nnx
174174
175175
import logging as slog
176176
from absl import logging as alog

docs_nnx/examples/gemma.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"metadata": {},
123123
"outputs": [],
124124
"source": [
125-
"from flax import nnx\n",
125+
"import nnx\n",
126126
"import sentencepiece as spm"
127127
]
128128
},

docs_nnx/examples/gemma.md

Lines changed: 1 addition & 1 deletion

docs_nnx/guides/bridge_guide.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"import os\n",
3232
"os.environ[\"XLA_FLAGS\"] = '--xla_force_host_platform_device_count=8'\n",
3333
"\n",
34-
"from flax import nnx\n",
34+
"import nnx\n",
3535
"from flax import linen as nn\n",
3636
"from flax.nnx import bridge\n",
3737
"import jax\n",

docs_nnx/guides/bridge_guide.md

Lines changed: 1 addition & 1 deletion

docs_nnx/guides/checkpointing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
42-
"from flax import nnx\n",
42+
"import nnx\n",
4343
"import orbax.checkpoint as ocp\n",
4444
"import jax\n",
4545
"from jax import numpy as jnp\n",

docs_nnx/guides/checkpointing.md

Lines changed: 1 addition & 1 deletion

docs_nnx/guides/demo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"source": [
1818
"import jax\n",
1919
"from jax import numpy as jnp\n",
20-
"from flax import nnx"
20+
"import nnx"
2121
]
2222
},
2323
{

docs_nnx/guides/demo.md

Lines changed: 1 addition & 1 deletion

docs_nnx/guides/filters_guide.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
}
4343
],
4444
"source": [
45-
"from flax import nnx\n",
45+
"import nnx\n",
4646
"\n",
4747
"class Foo(nnx.Module):\n",
4848
" def __init__(self):\n",

0 commit comments

Comments
 (0)