Comments (7)
from ssm.
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
1 # Default imports for SSM
2
----> 3 from .hmm import *
4 from .lds import *
~/Desktop/Projects/state-space-models/ssm/ssm/ssm/hmm.py in
7
8 from ssm.optimizers import adam_step, rmsprop_step, sgd_step, convex_combination
----> 9 from ssm.primitives import hmm_normalizer, hmm_expected_states, hmm_filter, hmm_sample, viterbi
10 from ssm.util import ensure_args_are_lists, ensure_args_not_none,
11 ensure_slds_args_not_none, ensure_variational_args_are_lists, \
~/Desktop/Projects/state-space-models/ssm/ssm/ssm/primitives.py in
2 import autograd.numpy as np
3 import autograd.numpy.random as npr
----> 4 from autograd.scipy.misc import logsumexp
5 from autograd.scipy.linalg import cholesky_banded, solve_banded, solveh_banded
6 from autograd.extend import primitive, defvjp
ImportError: cannot import name 'logsumexp'
from ssm.
My guess is that Python is still loading the pip installed version of Autograd. You can check by running
import autograd
autograd.__file__
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
pip install autograd --upgrade
from ssm.
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.
pip install autograd --upgrade
Requirement already up-to-date: autograd in /Users/shrumac2/miniconda3/envs/ssmodels/lib/python3.5/site-packages (1.3)
Requirement not upgraded as not directly required: numpy>=1.12 in /Users/shrumac2/miniconda3/envs/ssmodels/lib/python3.5/site-packages (from autograd) (1.16.4)
Requirement not upgraded as not directly required: future>=0.15.2 in /Users/shrumac2/miniconda3/envs/ssmodels/lib/python3.5/site-packages (from autograd) (0.17.1)
python
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:30:03)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.from autograd.scipy.misc import logsumexp
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'logsumexp'
from autograd.scipy.special import logsumexplogsumexp([1.0, 2.0, 3.0])
3.4076059644443806
from ssm.
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...
from ssm.
Thanks for the update, Scott. Here's the info:
autograd==1.3
certifi==2019.6.16
cycler==0.10.0
Cython==0.29.13
future==0.17.1
joblib==0.13.2
kiwisolver==1.1.0
matplotlib==3.1.1
numpy==1.17.0
pyparsing==2.4.1.1
python-dateutil==2.8.0
scikit-learn==0.21.2
scipy==1.3.0
six==1.12.0
tqdm==4.32.2
from ssm.
Thanks for your patience. The fix was simple in the end: I had to change the imports to from autograd.scipy.special import logsumexp
to work with the latest versions of scipy and autograd. Fix is here 57950a8.
Note: I also made these changes in the master branch of pybasicbayes and pyhsmm to fix the nosetests.
from ssm.
Related Issues (20)
- State Transition Parameters HOT 1
- using GPU HOT 1
- documentation: add pointer to ssm-jax
- access lag-specific autoregressive A matrix HOT 1
- Regularization of GLM weights for input driven observations and transitions HOT 1
- Singularity Container for the code
- error during installation HOT 4
- ARHMM usage HOT 1
- Unit tests fail in Python 3.8 HOT 1
- Diagonal Gaussian emissions for LDS? HOT 1
- Constraining AR-HMM emission parameters HOT 4
- Explained variance for the rSLDS latents HOT 3
- How to use _vjp_solve_banded_A HOT 1
- Is there any documentation for the ssm package, or at least for GLM-HMM part? HOT 1
- Time-varying C matrix? HOT 1
- Finding the variance explained for # of dimensions HOT 4
- Question on method ssm.HMM (GLM weight sign) HOT 2
- Trouble with SSM installation HOT 7
- rSLDS fitting changes significantly each time I initializa HOT 2
- Question about alpha calculation in forward pass HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssm.