Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

implied timescales with hmsm #1582

Open
drdoppio opened this issue Nov 8, 2022 · 4 comments
Open

implied timescales with hmsm #1582

drdoppio opened this issue Nov 8, 2022 · 4 comments

Comments

@drdoppio
Copy link

drdoppio commented Nov 8, 2022

I want to calculate implied timescale using the hidden markov state model with version 2.5.12:

import pyemma.msm as msm
nstates = 4
lags = [1,2,5,10,20,25,50]
its = msm.timescales_hmsm(dtrajs, nstates, lags=lags, errors='bayes', nsamples=250, n_jobs=-1)

the calculation hangs at the beginning: estimating BayesianHMSM: 0%

@clonker
Copy link
Member

clonker commented Nov 11, 2022

Can you try setting n_jobs=1? Depending on your linear algebra system implementation, parallelizing timescales can sometimes mess with the internal parallelization of bayesian hmsm estimation.

@drdoppio
Copy link
Author

Indeed it works with n_jobs=1. Even when njobs=2 the calculations halts.
Thanks a lot for the answer.

@mmfarrugia
Copy link

I just found this as I was searching for any pyemms.msm.its related issues and thought I'd note that this also occurs when calling pyemma.msm.its with MLE MSM as well as Bayesian MSM (neither are HMSM):

its = pyemma.msm.its(cluster.dtrajs, lags=50, nits=5)

and

its = pyemma.msm.its(cluster.dtrajs, lags=50, nits=5, errors='bayes')

I found this when running the "00" pentapeptide tutorial so steps to reproduce are simply from the tutorial and using the pre-made pyemma conda environment (plus latest of mdshare and a couple minor changes to fix a numpy incompatibility which are described in ) on a distributed network.

However, adding the n_jobs=1 argument fixed my problem as well:

its = pyemma.msm.its(cluster.dtrajs, lags=50, nits=5, n_jobs=1)

Thank you!

@mabianchet
Copy link

Happen to me also

its = pyemma.msm.its(cluster.dtrajs, lags=50, nits=5, errors='bayes') in a linux box on Mac work fine...

The notebook 03-03 - MSM estimation and validation hangs forever, and also
n_jobs=1 fix it!!

appears to be related to python multiprocessing

I upgrade to version '2.5.12+0.g5315b869.dirty', which addresses an issue with multiprocessing without luck...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants