facebookresearch / dadaptation

D-Adaptation for SGD, Adam and AdaGrad
MIT License
501 stars 19 forks source link

Import Error #8

Closed stefanwezel closed 1 year ago

stefanwezel commented 1 year ago

After installing the pip package and trying import dadaptation, I run into:

  File "/home/*****/anaconda3/lib/python3.9/site-packages/dadaptation/__init__.py", line 3, in <module>
    from .dadapt_sgd import DadaptSGD
ImportError: cannot import name 'DadaptSGD' from 'dadaptation.dadapt_sgd' (/home/*****/anaconda3/lib/python3.9/site-packages/dadaptation/dadapt_sgd.py)

Might the cause be the relative paths in dadaption/dadaption/__init__.py? :thinking:

ksadov commented 1 year ago

Had the same problem. Downgrading the package to version 1.3 fixed it in the immediate term, but it would be nice to have it fixed.

ksadov commented 1 year ago

Looks like it was introduced during a round of renaming in #7

adefazio commented 1 year ago

This should be fixed now, please let me know if it's not working for you. I pushed v1.5 with the fix.