17 Commits

Author SHA1 Message Date
Peter Hawkins
7f4ef63cd8 Run pyupgrade --py310-plus.
Also apply manual fixes to import sorting and unused imports.
2024-06-26 16:10:18 -04:00
Sergei Lebedev
f5617d7323 Removed noop # type: ignore comments
mypy should now flag these by default.
2024-05-19 21:01:29 +01:00
George Necula
df280a11b0 [shape_poly] Introduce is_symbolic_dim and deprecate is_poly_dim.
The old is_poly_dim seems to be used in a few places externally.
This was from the time when the symbolic dimensions were polynomials,
now we use the more generic term symbolic dimension or expression.

We introduce is_symbolic_dim and we export it through the jax.experimental.export.
We plan to make the entire shape_poly.py module private, and this is
a necessary step.
2024-01-10 10:10:30 +02:00
Jan Hrček
4da56dcdd7 Fix duplicate word occurrences 2023-12-19 06:15:30 +01:00
Sergei Lebedev
f936613b06 Upgrade remaining sources to Python 3.9
This PR is a follow up to #18881.

The changes were generated by adding

    from __future__ import annotations

to the files which did not already have them and running

    pyupgrade --py39-plus --keep-percent-format {jax,tests,jaxlib,examples,benchmarks}/**/*.py
2023-12-13 10:29:45 +00:00
Peter Hawkins
319ab98980 Apply pyupgrade --py39-plus.
Notable changes:
* use PEP 585 type names
* use PEP 604 type union syntax where `from __future__ import annotations` is present.
* use f-strings in more places.
* remove redundant arguments to open().
2023-07-21 14:49:44 -04:00
Peter Hawkins
ba557d5e1b Change JAX's copyright attribution from "Google LLC" to "The JAX Authors.".
See https://opensource.google/documentation/reference/releasing/contributions#copyright for more details.

PiperOrigin-RevId: 476167538
2022-09-22 12:27:19 -07:00
George Necula
b59db5b181 [jax2tf] Fix stale comments 2021-09-12 18:54:32 +03:00
George Necula
e2cf7a36de Edit the description of saved_model_lib.
PiperOrigin-RevId: 390112282
2021-08-11 05:59:23 -07:00
George Necula
2888e7ca81 [jax2tf] Add more documentation about saving models with custom gradients 2021-06-15 11:27:18 +03:00
George Necula
eff49fe106 [jax2tf] Upgraded examples and tests to allow shape polymorphism 2021-04-15 15:49:01 +03:00
George Necula
840d516203 [jax2tf] Removed more traces of support for batch polymorphism
See issue #6080

* Also cleanup the examples
2021-03-16 11:38:57 +01:00
George Necula
6d2b976fab [jax2tf] Start using jit_compile instead of the deprecated experimental_compile 2021-01-18 14:41:42 +02:00
George Necula
f5294e6f57 [jax2tf] Add the convert_and_save_model to the jax2tf API.
Expanded the documentation, including with a discussion
for various options for creating SavedModel from Flax
or Haiku models.
2020-11-09 13:30:24 +02:00
Benjamin Chetioui
ac9e27f447 [jax2tf(js)] Implement a CNN based on the Quickdraw dataset that
is convertible to TF.js.

- the demo is based on https://blog.tensorflow.org/2018/07/train-model-in-tfkeras-with-colab-and-run-in-browser-tensorflowjs.html
- the third_party code we include in the repo is the one used in
that demo and hosted at https://github.com/zaidalyafeai/zaidalyafeai.github.io/tree/master/sketcher
2020-11-04 15:00:17 +01:00
George Necula
4ee7a296c3 [jax2tf] Expanded the SavedModel library to allow the compilation of models.
This is important for use with TensorFlow serving.
Also removed the servo_main.py (only applies to OSS TF Serving, which
does not yet support XLA)

Co-authored-by: Benjamin Chetioui <3920784+bchetioui@users.noreply.github.com>
2020-11-03 12:52:08 +02:00
George Necula
2236d7c31f [jax2tf] Expanded the jax2tf examples.
There is now a coordinated set of 3 examples that show
training models, saving SavedModel, using with model server,
and reuse with Keras.

More details in examples/README.md
2020-11-02 12:04:59 +02:00