google-deepmind / optax

Optax is a gradient processing and optimization library for JAX.
https://optax.readthedocs.io
Apache License 2.0
1.56k stars 166 forks source link

AttributeError: module 'optax' has no attribute 'lbfgs' #990

Closed pascal-mueller closed 1 week ago

pascal-mueller commented 1 week ago

Hello,

so I wanted to use lbfgs but somehow I can't use it. I got this error:

AttributeError: module 'optax' has no attribute 'lbfgs'

I am in a virtual env, so I opened a REPL and tried a few things:

% python
Python 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import optax
>>> optax.lbfgs()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'optax' has no attribute 'lbfgs'
>>> optax.lars
<function lars at 0x119496ca0>
>>> optax.adam
<function adam at 0x119496980>
>>> optax.lamb
<function lamb at 0x119496d40>
>>> optax.lion
<function lion at 0x119496ac0>
>>> optax.lbfgs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'optax' has no attribute 'lbfgs'

Am I missing something? I am on version 0.2.2.

Edit: 0.2.2 seems to be the latest release and the alias.py doesn't define a lbfgs - so it's simply not released yet?

mblondel commented 1 week ago

Indeed, the latest release is from March and LBFGS was only added recently.

vroulet commented 1 week ago

Once #991 is merged, I can do a release.