markovmodel / PyEMMA

🚂 Python API for Emma's Markov Model Algorithms 🚂
http://pyemma.org
GNU Lesser General Public License v3.0
311 stars 119 forks source link

Pyemma : TICA analysis AttributeError: 'function' object has no attribute 'children' #1435

Closed srp106 closed 5 years ago

srp106 commented 5 years ago

Hi Pyemma users,

I am getting following error while doing the TICA analysis, could you please help to fix the bug.

function' object has no attribute 'children'

Thank you.

calculate covariances

AttributeError Traceback (most recent call last)

in ----> 1 tica_obj = coor.tica(inp, lag=20, var_cutoff=0.9, kinetic_map=True) 2 print('TICA dimension ', tica_obj.dimension()) ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/api.py in tica(data, lag, dim, var_cutoff, kinetic_map, commute_map, weights, stride, remove_mean, skip, reversible, ncov_max, chunksize, **kwargs) 1261 weights=weights, reversible=reversible, ncov_max=ncov_max) 1262 if data is not None: -> 1263 res.estimate(data, chunksize=cs) 1264 else: 1265 res.chunksize = cs ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/transform/tica.py in estimate(self, X, **kwargs) 156 the independent components. 157 """ --> 158 return super(TICA, self).estimate(X, **kwargs) 159 160 def partial_fit(self, X): ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/data/_base/transformer.py in estimate(self, X, **kwargs) 213 """ Basis class for pipelined Transformers, which perform also estimation. """ 214 def estimate(self, X, **kwargs): --> 215 super(StreamingEstimationTransformer, self).estimate(X, **kwargs) 216 # we perform the mapping to memory exactly here, because a StreamingEstimator on its own 217 # has not output to be mapped. Only the combination of Estimation/Transforming has this feature. ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/data/_base/streaming_estimator.py in estimate(self, X, chunksize, **kwargs) 42 # run estimation 43 try: ---> 44 super(StreamingEstimator, self).estimate(X, **kwargs) 45 except NotConvergedWarning as ncw: 46 self.logger.info( ~/miniconda3/lib/python3.7/site-packages/pyemma/_base/estimator.py in estimate(self, X, **params) 405 if params: 406 self.set_params(**params) --> 407 self._model = self._estimate(X) 408 # ensure _estimate returned something 409 assert self._model is not None ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/transform/tica.py in _estimate(self, iterable, **kw) 203 self.logger.debug("Running TICA with tau=%i; Estimating two covariance matrices" 204 " with dimension (%i, %i)", self._lag, indim, indim) --> 205 covar.estimate(iterable, chunksize=self.chunksize, **kw) 206 self.model.update_model_params(mean=covar.mean, 207 cov=covar.C00_, ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/data/_base/streaming_estimator.py in estimate(self, X, chunksize, **kwargs) 42 # run estimation 43 try: ---> 44 super(StreamingEstimator, self).estimate(X, **kwargs) 45 except NotConvergedWarning as ncw: 46 self.logger.info( ~/miniconda3/lib/python3.7/site-packages/pyemma/_base/estimator.py in estimate(self, X, **params) 405 if params: 406 self.set_params(**params) --> 407 self._model = self._estimate(X) 408 # ensure _estimate returned something 409 assert self._model is not None ~/miniconda3/lib/python3.7/site-packages/pyemma/coordinates/estimation/covariance.py in _estimate(self, iterable, partial_fit) 208 #self.skipped=0 209 pg = ProgressReporter() --> 210 pg.register(it.n_chunks, 'calculate covariances', stage=0) 211 with it, pg.context(stage=0): 212 self._init_covar(partial_fit, it.n_chunks) ~/miniconda3/lib/python3.7/site-packages/pyemma/_base/progress/reporter/__init__.py in register(self, amount_of_work, description, stage, tqdm_args) 218 219 def register(self, amount_of_work, description='', stage=0, tqdm_args=None): --> 220 self._progress_register(amount_of_work=amount_of_work, description=description, stage=stage, tqdm_args=tqdm_args) 221 222 def update(self, increment, stage=0): ~/miniconda3/lib/python3.7/site-packages/pyemma/_base/progress/reporter/__init__.py in _progress_register(self, amount_of_work, description, stage, tqdm_args) 143 if _attached_to_ipy_notebook_with_widgets(): 144 from .notebook import my_tqdm_notebook --> 145 pg = my_tqdm_notebook(leave=False, **args) 146 else: 147 import tqdm ~/miniconda3/lib/python3.7/site-packages/tqdm/notebook.py in __init__(self, *args, **kwargs) 216 # Print initial bar state 217 if not self.disable: --> 218 self.display() 219 220 def __iter__(self, *args, **kwargs): ~/miniconda3/lib/python3.7/site-packages/tqdm/notebook.py in display(self, msg, pos, close, bar_style) 151 msg = self.__repr__() 152 --> 153 pbar, ptext = self.container.children 154 pbar.value = self.n 155 AttributeError: 'function' object has no attribute 'children' Thanks for submitting an issue! - [ ] Include a detailed description of the bug or suggestion : added - [ ] `pip list` or `conda list` of the environment you are using (please attach a txt file to the issue).: attached - [ ] PyEMMA version and operating system versions : 2.4 and 2.5.6 versions - [ ] Minimal example if possible, a Python script, zipped input data : PyEMMA_IPython-master/applications/pentapeptide_msm [bug.txt](https://github.com/markovmodel/PyEMMA/files/3655016/bug.txt)
marscher commented 5 years ago

Thanks for your detailed report, this is already fixed in #1434, but yet unreleased. Please expect a new release today.

marscher commented 5 years ago

v2.5.7 is already released since yesterday. The conda packages are in place.