52 Commits

Author SHA1 Message Date
Jake VanderPlas
55e3be65b7 Remove dependency on sphinx_autodoc_typehints 2024-04-29 14:19:46 -07:00
Jake VanderPlas
29b15e2e2d DOC: pin sphinx to >=7.3.2 2024-04-17 09:51:27 -07:00
Jake VanderPlas
40ad5b283f Pin sphinx version to avoid error in 7.3.0 2024-04-16 16:51:06 -07:00
jax authors
04f2c91399 Merge pull request #19092 from 8bitmp3:jax-docs-gradient-checkpointing
PiperOrigin-RevId: 597034325
2024-01-09 13:50:13 -08:00
8bitmp3
efeb20e380 Upgrade JAX Gradient Checkpointing doc 2024-01-08 23:36:21 +00:00
Jake VanderPlas
ccecdba8d9 DOC: remove unnecessary doc build requirement 2024-01-04 15:06:12 -08:00
George Necula
b077483bfa [export] Add support for serialization and deserialization of Exported
At the moment we can export a JAX function into an Exported and we can invoke an Exported from another JAX function, but there is no way to serialize an Exported to be able to use it in another process.

Exported now has all the features we had in mind, so it is a reasonable time to add a serialization method. The intention is for the serialization to have backwards compatibility guarantees, meaning that we can deserialize an Exported that has been serialized with an older version of JAX. This PR does not add explicit support for versioning, nor backwards compatibility tests. Those will follow.

Here we add serialization and deserialization to bytearray, using the flatbuffers package. We use flatbuffers because it is simple, it has backwards and forwards compatibility guarantees, it is a lightweight dependency that does not require additional build steps, and it is fast (deserialization simply indexes into the bytearray rather than creating a Python structure).

In the process of implementing this we have done some small cleanup of the Exported structure:

  * renamed serialization_version to mlir_module_serialization_version
  * renamed disabled_checks to disabled_safety_checks

This code is tested by changing export_test.py to interpose a serialization followed by a deserialization every time we export.export.

There is a known bug with the serialization of effects, so I disabled one of the export tests. Will fix in a subsequent PR.

PiperOrigin-RevId: 590078785
2023-12-11 23:23:02 -08:00
Jake VanderPlas
c0b07ea48c DOC: update package requirements 2023-11-20 11:22:29 -08:00
Jake VanderPlas
9ec3ad1ce7 DOC: pin newest sphinx-book-theme 2023-03-31 08:42:34 -07:00
Jake VanderPlas
8562a8d7bc DOC: pin pydata-sphinx-theme to fix incompatibility 2023-03-29 13:55:32 -07:00
Jake VanderPlas
55d9c06267 DOC: update sphinx & sphinx-autodoc-typehints 2023-03-01 11:03:20 -08:00
Ravin Kumar
2257e2075d Update doc landing page
Co-authored-by: 8bitmp3 <19637339+8bitmp3@users.noreply.github.com>
Co-authored-by: Jake VanderPlas <jakevdp@google.com>
2023-01-13 12:45:28 -08:00
Jake VanderPlas
beeb15e176 DOC: change requirements pinnings to prevent timeout 2023-01-09 08:32:03 -08:00
Jake VanderPlas
eb27deace2 CI: fix doc requirements
sphinx-autodoc-typehints now requires sphinx>=5.3, and this has slowed down pips dependency
resolver to the point where the CI times out.
2023-01-06 10:12:34 -08:00
Jake VanderPlas
406b5525a4 DOC: fix sphinx version for readthedocs 2022-12-29 15:37:54 -08:00
Sharad Vikram
c0c8eed6fa Pin IPython version in docs build to avoid RTD warning 2022-11-28 11:22:41 -08:00
Jake VanderPlas
acdb545941 CI: add absl-py to docs/requirements.txt 2022-11-04 11:28:15 -07:00
Peter Hawkins
3dc7ce2bfb Pin a minimum version of sphinx-book-theme to avoid bad pip dependency
resolution.
2022-08-08 16:11:19 +00:00
Jake VanderPlas
37c249fc80 MAINT: unpin autodoc-typehints 2022-08-01 10:33:50 -07:00
Jake VanderPlas
b405f17740 CI: upgrade doc requirements 2022-07-11 14:08:53 -07:00
Jake VanderPlas
b5b78b1052 CI: build docs with most recent myst-nb version 2022-06-21 08:44:23 -07:00
Jake VanderPlas
c42b91b228 CI: unpin traitlets 2022-06-08 11:57:10 -07:00
Jake VanderPlas
eadd845d24 CI: pin traitlets to <5.2 in doc build 2022-05-31 13:38:41 -07:00
Jake VanderPlas
29efc30c63 DOC: update myst-nb to v0.15.0 2022-05-09 14:32:48 -07:00
Jake VanderPlas
472f72a83f docs: pin myst-nb to 0.13.2 2022-04-29 16:01:41 -07:00
tornikeo
6423741db0 Add copy button to code snippets in documentation 2022-02-22 13:49:48 +04:00
Yash Katariya
1ad3551ec9 Release jax and jaxlib 0.3.0 as per the new release process.
PiperOrigin-RevId: 427809845
2022-02-10 11:59:13 -08:00
Peter Hawkins
efacc93088 Use the sphinx-book-theme for JAX documentation. 2022-02-04 09:00:07 -05:00
Jake VanderPlas
42a2e66fbe DOC: pin docutils==0.16 to restore bullets in lists 2022-01-24 12:02:39 -08:00
Jake VanderPlas
eba2ed2fd6 Update sphinx-related packages 2022-01-04 14:16:57 -08:00
Jake VanderPlas
cfe0156f5c readthedocs: use new build configuration & update to Python 3.9 2021-10-27 20:44:25 -07:00
Jake VanderPlas
bae93ed9b1 DOC: pin jupyter-core to fix RTD build 2021-10-27 09:02:24 -07:00
Peter Hawkins
3ddcec27f2 Update minimum jaxlib version to 0.1.69. 2021-07-15 17:00:13 -04:00
Jake VanderPlas
0c91be7b46 CI: temporarily pin numpy to <1.21 2021-06-22 11:15:16 -07:00
Loïc Estève
6192516dfd
Use scikit-learn rather than sklearn in docs/requirements.txt 2021-06-21 12:03:44 +02:00
Skye Wanderman-Milne
cec132e32c Pin sphinx-autodoc-typehints version to 1.11.1
Our docs build fails with 1.12.1: https://readthedocs.org/projects/jax/builds/13514541/
```
reading sources... [ 50%] _autosummary/jax.numpy.linalg.pinv

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/jax/envs/latest/lib/python3.8/site-packages/sphinx/events.py", line 111, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/jax/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints.py", line 417, in process_docstring
    type_hints = get_all_type_hints(obj, name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/jax/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints.py", line 271, in get_all_type_hints
    rv = backfill_type_hints(obj, name)
  File "/home/docs/checkouts/readthedocs.org/user_builds/jax/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints.py", line 312, in backfill_type_hints
    obj_ast = ast.parse(textwrap.dedent(
  File "/home/docs/.pyenv/versions/3.8.6/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 12
    max_rows_cols = max(a.shape[-2:])
                                    ^
IndentationError: expected an indented block
```

This may be caused by https://github.com/agronholm/sphinx-autodoc-typehints/pull/166
2021-04-14 17:58:27 -07:00
Jake VanderPlas
d96ec4b27a DOC: clean up JAX 101 notebooks and remove WIP warning 2021-04-01 16:27:06 -07:00
Jake VanderPlas
d6408a4e6a Add extras_require to setup.py 2021-03-16 13:23:46 -07:00
Jake VanderPlas
a641452bc1 DOC: update doc build requirements 2021-02-23 10:31:26 -08:00
Jake VanderPlas
69bba7f210 Remove pygments pinning for RTD 2021-02-16 13:25:59 -08:00
Jake VanderPlas
d85d204897 DOC: change build from nbsphinx to myst 2021-02-16 10:28:39 -08:00
Skye Wanderman-Milne
6dc161cf27
Pin pygments version in RTD build. (#4267)
This fixes our RTD failures, which were caused by RTD installing an older version of pygments:
```
jupyterlab-pygments 0.1.1 requires pygments<3,>=2.4.1, but you'll have pygments 2.3.1 which is incompatible.
nbconvert 6.0.1 requires pygments>=2.4.1, but you'll have pygments 2.3.1 which is incompatible.
```
2020-09-11 11:16:54 -07:00
Justin Lebar
fb02cc80f7
Update docs requirements. (#3969) 2020-08-07 11:47:05 -07:00
George Necula
4f3011f320
Refactored host_callback to use the C++ runtime. (#3644)
* Refactored host_callback to use the C++ runtime.

* The new runtime makes it unnecessary to start the outfeed_receiver
  in the user's code
* We don't need msgpack anymore
* There is an interaction between host_callback and using lax.outfeed.
  I am trying to solve this by (a) making host_callback_test stop the
  outfeed receiver on finish and infeed_test on start, and (b)
  telling pytest-xdist to run all the tests from one file into
  a single worker.
2020-07-04 18:12:58 +03:00
Skye Wanderman-Milne
8bc7820573
Use myst to parse markdown docs, and convert a page from rst to markdown. (#3477)
Also sets the minimum sphinx version to 2.1.
2020-06-17 16:59:14 -07:00
Peter Hawkins
58f8329a40
Switch CI builds from Travis to Github actions (#3409) 2020-06-11 17:10:56 -04:00
George Necula
7acb41d57c
Fixed imports for readthedocs (#3033) 2020-05-11 14:37:17 +03:00
Matthew Johnson
909fee6a2d try adding sphinx-autodoc-typehints 2020-03-30 20:22:04 -07:00
George Necula
eae59d0b2c
Moved all notebooks to docs/notebooks. (#1493)
* Moved all notebooks to docs/notebooks.

Now all notebooks are in the same place, thus all are subject
to auto-doc generation at readthedocs.io and to automated testing
with travis.

Some notebooks are too slow, exclude them at docs/conf.py:exclude_patterns.

Cleanup a bit the section headings in notebooks so that they show
up well in readtehdocs.io.

* Increase the cell timeout for executing notebooks
* Exclude also the neural network notebook from auto-generation (timing out)
* Disable the score_matching notebook from auto-doc (travis does not have sklearn)
2019-10-17 08:58:25 +02:00
George Necula
c9d984b328 Fixed the readthedocs documentation build
Had to extend the docs/requirements.txt file to install
matplotlb (needed by the Gotchas notebook) and ".",
needed by everything. This results in a reduction
of the sphinx warnings from 3300 to 1200!
2019-10-09 14:43:42 +02:00