You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
I'm doing some CK tests and saving them to disk as pickle files for visualization purposes.
I get the following error when I try to plot a CK test that has been previously saved to disk:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-22-86b859a92999> in <module>()
----> 1 plot_cktest(ck_loaded)
~/miniconda3/lib/python3.6/site-packages/pyemma/plots/markovtests.py in plot_cktest(cktest, figsize, diag, y01, layout, padding_between, padding_top, units, dt, **plot_kwargs)
136 i = int(k/cktest.nsets)
137 j = int(k%cktest.nsets)
--> 138 lest, lpred = _add_ck_subplot(cktest, ax, i, j, y01=y01, units=units, dt=dt, **plot_kwargs)
139 # figure legend
140 predlabel = 'predict'
~/miniconda3/lib/python3.6/site-packages/pyemma/plots/markovtests.py in _add_ck_subplot(cktest, ax, i, j, ipos, jpos, y01, units, dt, **plot_kwargs)
33 lest = ax.plot(dt*cktest.lagtimes, cktest.estimates[:, i, j], color='black', **plot_kwargs)
34 # plot error of estimates if available
---> 35 if cktest.has_errors and cktest.err_est:
36 ax.fill_between(dt*cktest.lagtimes, cktest.estimates_conf[0][:, i, j], cktest.estimates_conf[1][:, i, j],
37 color='black', alpha=0.2)
AttributeError: 'ChapmanKolmogorovValidator' object has no attribute 'has_errors'
Here are the steps to reproduce:
frompyemma.msmimportBayesianMSM, ChapmanKolmogorovValidatorfrompyemma.plotsimportplot_cktestlag_time=25n_macrostates=5mlags=6msm=BayesianMSM(lag=lag_time, dt_traj='0.2 ns')
msm.fit(list(ktrajs.values())) # ktrajs is a dict of lists with integersck=msm.cktest(
n_macrostates,
err_est=True,
n_jobs=-1,
mlags=mlags
)
plot_cktest(ck) # This worksck.save('ck_testing.pkl', model_name='model')
ck_loaded=ChapmanKolmogorovValidator.load('ck_testing.pkl', 'model')
plot_cktest(ck_loaded) # This gives the above errorck.has_errors# This is Trueck_loaded.has_errors
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-28-78c530e7ce04> in <module>()
----> 1 ck_loaded.has_errors
AttributeError: 'ChapmanKolmogorovValidator' object has no attribute 'has_errors'
I'm on pyemma version 2.5.2, OS is macOS High Sierra v.10.13.3
Hi, thanks for your report! Sorry about that, you can fix your restored models in the mean time (we can provide a fix for this, which will also makes this work with future version) by doing this:
I'm doing some CK tests and saving them to disk as pickle files for visualization purposes.
I get the following error when I try to plot a CK test that has been previously saved to disk:
Here are the steps to reproduce:
I'm on pyemma version 2.5.2, OS is macOS High Sierra v.10.13.3
here's the output of my conda list
The text was updated successfully, but these errors were encountered: