Skip to content

Commit 54dc76d

Browse files
authored
Merge pull request #117 from marscher/ceff_no_multiprocess
do not require multiprocess, but use stdlib in efficient_count_matrix parallelization
2 parents e6ea742 + 6780ef4 commit 54dc76d

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

Diff for: appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ environment:
1919

2020
install:
2121
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%;"
22-
- conda config --add channels conda-forge
2322
- conda install conda-build -yq -c defaults
2423
# Build the compiled extension and run the project tests
2524
- "%CMD_IN_ENV% conda build -c conda-forge -q tools/conda-recipe --numpy=%CONDA_NUMPY%"

Diff for: doc/source/CHANGELOG.rst

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
Changelog
22
=========
33

4+
1.2.4 (11-12-18)
5+
---------------
6+
7+
**Fixes:**
8+
- Effective count matrix parallel evaluation fixes. #116, #117
9+
10+
1.2.3 (7-27-18)
11+
---------------
12+
13+
**New features**
14+
15+
- Effective count matrix can be evaluated in parallel. #112
16+
17+
418
1.2.2 (6-25-18)
519
---------------
620

Diff for: msmtools/estimation/sparse/effective_counts.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,7 @@ def statistical_inefficiencies(dtrajs, lag, C=None, truncate_acf=True, mact=2.0,
199199
# compute inefficiencies
200200
I, J = C.nonzero()
201201
if n_jobs > 1:
202-
try:
203-
from multiprocess.pool import Pool, MapResult
204-
except ImportError:
205-
raise RuntimeError('using multiple jobs requires the multiprocess library. '
206-
'Install it with conda or pip')
207-
202+
from multiprocessing.pool import Pool, MapResult
208203
from contextlib import closing
209204
import tempfile
210205

Diff for: msmtools/estimation/tests/test_effective_count_matrix.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@
2727

2828
"""Unit tests for the transition_matrix module"""
2929

30-
have_multiprocess_lib = True
31-
try:
32-
import multiprocess
33-
del multiprocess
34-
except ImportError:
35-
have_multiprocess_lib = False
36-
3730

3831
class TestEffectiveCountMatrix(unittest.TestCase):
3932

@@ -70,9 +63,7 @@ def test_multitraj(self):
7063
assert np.array_equal(C.nonzero(), Ceff.nonzero())
7164
assert np.all(Ceff.toarray() <= C.toarray())
7265

73-
@unittest.skipIf(not have_multiprocess_lib, 'multiprocess lib missing')
7466
def test_multitraj_njobs(self):
75-
import _multiprocess
7667
dtrajs = [[1, 0, 1, 0, 1, 1, 0, 0, 0, 1], [2], [0, 1, 0, 1]]
7768
# lag 1
7869
C = count_matrix(dtrajs, 1)
@@ -94,8 +85,8 @@ def test_multitraj_njobs(self):
9485
assert np.array_equal(Ceff2.shape, C.shape)
9586
assert np.array_equal(C.nonzero(), Ceff2.nonzero())
9687
assert np.all(Ceff2.toarray() <= C.toarray())
97-
98-
@unittest.skipIf(os.getenv('CI', False), 'need physical processors >=2, dont have on CI')
88+
89+
@unittest.skipIf(os.getenv('CI', False), 'need physical cores')
9990
def test_njobs_speedup(self):
10091
artificial_dtraj = [np.random.randint(0, 100, size=10000) for _ in range(10)]
10192
import time

Diff for: tools/conda-recipe/meta.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ test:
3737
requires:
3838
- pytest
3939
- pytest-cov
40-
- multiprocess
4140

4241
about:
4342
home: http://github.com/markovmodel/msmtools

0 commit comments

Comments
 (0)