Skip to content

Commit

Permalink
Removes flax.optim & bumps version to 0.6.0
Browse files Browse the repository at this point in the history
This fixes #2273

PiperOrigin-RevId: 467869152
  • Loading branch information
andsteing authored and Flax Authors committed Aug 16, 2022
1 parent 47418b3 commit cda7a4c
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 1,724 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ vNext
(Add your change to a random empty line to avoid merge conflicts)
-
-
- Switched to using `jax.named_scope` for all profile naming, cut some pointless
stack traces out.
-
-
-
Expand All @@ -27,6 +25,14 @@ vNext
-
-

0.6.0
-----

- Removed deprecated optimizers in `flax.optim` package.
- Moved `flax.optim.dynamic_scale` to `flax.training.dynamic_scale`.
- Switched to using `jax.named_scope` for all profile naming, cut some pointless
stack traces out.

0.5.3
-----
New features:
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_topics/optax_update_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Upgrading my Codebase to Optax
We have proposed to replace :py:mod:`flax.optim` with `Optax
<https://optax.readthedocs.io>`_ in 2021 with `FLIP #1009
<https://github.com/google/flax/blob/main/docs/flip/1009-optimizer-api.md>`_ and
the Flax optimizers are now *effectively deprecated*. This guide is targeted
the Flax optimizers have been removed in v0.6.0 - this guide is targeted
towards :py:mod:`flax.optim` users to help them update their code to Optax.

See also Optax's quick start documentation:
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
myst_enable_extensions = ['dollarmath']
nb_execution_excludepatterns = [
'getting_started.ipynb', # <-- times out
'optax_update_guide.ipynb', # <-- requires flax<=0.5.3
]
# raise exceptions on execution so CI can catch errors
nb_execution_allow_errors = False
Expand Down
3 changes: 2 additions & 1 deletion docs/notebooks/optax_update_guide.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
},
"outputs": [],
"source": [
"!pip install -q flax optax"
"# flax.optim was deprecated after 0.5.3\n",
"!pip install -q --force-reinstall flax==0.5.3 optax"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion docs/notebooks/optax_update_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ https://flax.readthedocs.io/en/latest/howtos/optax_update_guide.html
:id: I4PiwrnnO6Fw
:tags: [skip-execution]
!pip install -q flax optax
# flax.optim was deprecated after 0.5.3
!pip install -q --force-reinstall flax==0.5.3 optax
```

```{code-cell}
Expand Down
10 changes: 6 additions & 4 deletions flax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@

"""Flax API."""

from . import core as core
from . import linen as linen
from . import core
from . import jax_utils
from . import linen
from . import serialization
from . import traverse_util

# DO NOT REMOVE - Marker for internal deprecated API.
# DO NOT REMOVE - Marker for internal logging.
from .version import __version__

# Allow `import flax`; `flax.optim.[...]`, etc
8 changes: 0 additions & 8 deletions flax/optim/README.md

This file was deleted.

63 changes: 0 additions & 63 deletions flax/optim/__init__.py

This file was deleted.

114 changes: 0 additions & 114 deletions flax/optim/adabelief.py

This file was deleted.

82 changes: 0 additions & 82 deletions flax/optim/adadelta.py

This file was deleted.

Loading

0 comments on commit cda7a4c

Please sign in to comment.