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] improve docs #4236

Merged
merged 1 commit into from
Oct 1, 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
31 changes: 31 additions & 0 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- htmlzip
- epub
# - pdf

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- all
- testing
- docs
4 changes: 1 addition & 3 deletions docs_nnx/nnx_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@
"source": [
"`nnx.Variable`'s inner values can be accessed using the `.value` property, however\n",
"for convenience they implement all numeric operators and can be used directly in\n",
"arithmetic expressions (as shown above). Additionally, Variables can passed\n",
"to any JAX function as they implement the `__jax_array__` protocol (as long as their\n",
"inner value is a JAX array).\n",
"arithmetic expressions (as shown above).\n",
"\n",
"To actually initialize a Module you simply call the constructor, all the parameters\n",
"of a Module are usually created eagerly. Since Modules hold their own state methods\n",
Expand Down
4 changes: 1 addition & 3 deletions docs_nnx/nnx_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ class Linear(nnx.Module):

`nnx.Variable`'s inner values can be accessed using the `.value` property, however
for convenience they implement all numeric operators and can be used directly in
arithmetic expressions (as shown above). Additionally, Variables can passed
to any JAX function as they implement the `__jax_array__` protocol (as long as their
inner value is a JAX array).
arithmetic expressions (as shown above).

To actually initialize a Module you simply call the constructor, all the parameters
of a Module are usually created eagerly. Since Modules hold their own state methods
Expand Down
Loading