New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attribute error with scipy.misc.logsumexp and autograd #51
Comments
Hi Shruthi,
Yes, I’m waiting for the autograd fix to make it to pypi. Please try installing autograd from github master.
Thanks,
Scott
… On Jul 26, 2019, at 8:24 AM, r-shruthi11 ***@***.***> wrote:
Hi,
I think related to this issue (HIPS/autograd#501) here, I'm having trouble importing ssm because I get an attribute error trying to import logsumexp from scipy.misc. Would re-installing autograd from the master branch be the solution here?
Thanks!
Shruthi
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks, Scott. I've tried that but I still see the same issue. ----> 1 import ssm ~/Desktop/Projects/state-space-models/ssm/ssm/ssm/init.py in ~/Desktop/Projects/state-space-models/ssm/ssm/ssm/hmm.py in ~/Desktop/Projects/state-space-models/ssm/ssm/ssm/primitives.py in ImportError: cannot import name 'logsumexp' |
My guess is that Python is still loading the pip installed version of Autograd. You can check by running
and seeing what path it's pointing to. Make sure it's the path from Github. That said, I just double checked Autograd and it looks like @mattjj just uploaded the latest Github master to PyPI. You should be able to get it by running
|
Hi Scott, I tried both - setting the autograd path to point to the Github directory and upgrading my install of autograd but I still see the same error when I try to import logsumexp from autograd.scipy.misc. However, importing logsumexp from autograd.scipy.special seems to work.
|
Sorry for the delay. Quick update: I reran the Travis integrations and they are also failing in the same way you describe. Unfortunately I haven't been able to reproduce the problem locally yet, and I'm currently tied up at a conference so it might take a few more days. In the meantime, it would be helpful to also know more about your configuration: what version of numpy/scipy are you on? I'm sure there's a simple explanation for all this... |
Thanks for the update, Scott. Here's the info: autograd==1.3 |
Thanks for your patience. The fix was simple in the end: I had to change the imports to Note: I also made these changes in the master branch of pybasicbayes and pyhsmm to fix the nosetests. |
Hi,
I think related to this issue (HIPS/autograd#501) here, I'm having trouble importing ssm because I get an attribute error trying to import logsumexp from scipy.misc. Would re-installing autograd from the master branch be the solution here?
Thanks!
Shruthi
The text was updated successfully, but these errors were encountered: