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

Commit

Permalink
Merge pull request #1112 from marscher/fix_transformer_in_memory
Browse files Browse the repository at this point in the history
Fix transformer in memory
  • Loading branch information
marscher authored Jun 8, 2017
2 parents 8b187c7 + 555e2a8 commit 561e23c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions doc/source/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ Changelog
**New features**:

- msm: Added Augmented Markov Models. A way to include averaged experimental
data into estimation of Markov models from molecular simulations. The method is described in [1].
data into estimation of Markov models from molecular simulations. The method is described in [1]. #1111

- References:

[1] Olsson S, Wu H, Paul F, Clementi C, Noe F: Combining Experimental and Simulation Data
[1] Olsson S, Wu H, Paul F, Clementi C, Noe F: Combining Experimental and Simulation Data
via Augmented Markov Models" In revision.

**Fixes**:

- datasets: fixed get_multi_temperature_data and get_umbrella_sampling_data for Python 3. #1102
- coordinates: fixed StreamingTransformers (TICA, Kmeans, etc.) not respecting the in_memory flag. #1112


2.4 (05-19-2017)
Expand Down
4 changes: 2 additions & 2 deletions pyemma/coordinates/data/_base/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

import numpy as np
import six

from pyemma._ext.sklearn.base import TransformerMixin
from pyemma.coordinates.data._base.datasource import DataSource, DataSourceIterator
from pyemma.coordinates.data._base.iterable import Iterable
from pyemma.coordinates.data._base.random_accessible import RandomAccessStrategy
from pyemma.coordinates.data._base.streaming_estimator import StreamingEstimator
from pyemma.coordinates.util.change_notification import (inform_children_upon_change,
NotifyOnChangesMixIn)
from pyemma.util.annotators import deprecated
from six.moves import range


Expand Down Expand Up @@ -229,7 +229,7 @@ class StreamingTransformerIterator(DataSourceIterator):
def __init__(self, data_source, skip=0, chunk=0, stride=1, return_trajindex=False, cols=None):
super(StreamingTransformerIterator, self).__init__(
data_source, return_trajindex=return_trajindex)
self._it = self._data_source.data_producer._create_iterator(
self._it = self._data_source.data_producer.iterator(
skip=skip, chunk=chunk, stride=stride, return_trajindex=return_trajindex, cols=cols
)
self.state = self._it.state
Expand Down
2 changes: 1 addition & 1 deletion pyemma/coordinates/data/fragmented_trajectory_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _read_full(self, skip):
# if stride doesn't divide length, one has to offset the next trajectory
overlap = self._calculate_new_overlap(self._stride, self._reader_lengths[idx], overlap)
chunksize = min(length, r.trajectory_length(0, self._stride, skip=_skip))
it = r._create_iterator(stride=self._stride, skip=_skip, chunk=chunksize, return_trajindex=True)
it = r.iterator(stride=self._stride, skip=_skip, chunk=chunksize, return_trajindex=True)
with it:
for itraj, data in it:
L = len(data)
Expand Down

0 comments on commit 561e23c

Please sign in to comment.