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

ContinuousTimeMSM cannot load from pickle #713

Closed
mpharrigan opened this issue Jan 26, 2016 · 2 comments
Closed

ContinuousTimeMSM cannot load from pickle #713

mpharrigan opened this issue Jan 26, 2016 · 2 comments
Labels
Milestone

Comments

@mpharrigan
Copy link
Member

/home/x/opt/miniconda3/lib/python3.4/site-packages/scipy/sparse/linalg/interface.py in __new__(cls, *args, **kwargs)
    140                                 " at least one of _matvec and _matmat.")
    141 
--> 142             obj.__init__(*args, **kwargs)
    143             return obj
    144 

TypeError: __init__() missing 2 required positional arguments: 'sk' and 'yk'
@mpharrigan
Copy link
Member Author

Seems that optimizer_state_ is the problem

@mpharrigan
Copy link
Member Author

workaround

    pickle.dump({
            k: rmsm.__dict__[k]
            for k in [
                'lag_time',
                'n_timescales',
                'ergodic_cutoff',
                'verbose',
                'sliding_window',
                'guess',
                'theta_',
                'ratemat_',
                'transmat_',
                'countsmat_',
                'n_states_',
                'mapping_',
                'populations_',
                'information_',
                'loglikelihoods_',
                'timescales_',
                'eigenvalues_',
                'left_eigenvectors_',
                'right_eigenvectors_',
                'percent_retained_',
            ]
        }, f)
from msmbuilder.msm import ContinuousTimeMSM
rmsm = ContinuousTimeMSM()
rmsm.__dict__.update(**pickle.load(f))

@mpharrigan mpharrigan added the bug label Jan 30, 2016
@mpharrigan mpharrigan added this to the v3.4 milestone Jan 30, 2016
@mpharrigan mpharrigan modified the milestones: v3.5, v3.4 Mar 16, 2016
mpharrigan added a commit to mpharrigan/mixtape that referenced this issue Jun 7, 2016
@mpharrigan mpharrigan mentioned this issue Jun 7, 2016
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant