facebookresearch / optimizers

For optimization algorithm research and development.
Other
442 stars 31 forks source link

ModuleNotFoundError: No module named 'optimizer_modules' #28

Closed francois-rozet closed 4 weeks ago

francois-rozet commented 1 month ago

The files optimizer_modules.py, matrix_functions.py, and matrix_functions_types.py are not part of the installed module. This means that importing the module anywhere else than at the root of the repo, does not work.

For example,

$ git clone https://github.com/facebookresearch/optimizers
$ cd optimzers
$ pip install -e .
$ cd ..
$ python -c "from distributed_shampoo.distributed_shampoo import DistributedShampoo"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/mnt/home/frozet/optimizers/distributed_shampoo/distributed_shampoo.py", line 77, in <module>
    from distributed_shampoo.utils.shampoo_checkpoint_utils import (
  File "/mnt/home/frozet/optimizers/distributed_shampoo/utils/shampoo_checkpoint_utils.py", line 18, in <module>
    from optimizer_modules import OptimizerModule
ModuleNotFoundError: No module named 'optimizer_modules'
tsunghsienlee commented 4 weeks ago

Hi @francois-rozet , @runame provided the fix in #29 , and I am merging this now. Thanks for your report!