Skip to content

Fix ensemble testing - #242

Merged
jhprinz merged 1 commit into
openpathsampling:masterfrom
dwhswenson:fix_ensemble_testing
May 3, 2015
Merged

jhprinz merged 1 commit into
openpathsampling:masterfrom
dwhswenson:fix_ensemble_testing

Conversation

@dwhswenson

Copy link
Copy Markdown
Member

We'd recently been getting occasional errors in test_ensemble. This PR fixes that.

In a test before this fix, I got errors 12/100 runs of nosetests test_ensemble.py. After this fix, 0/100.

The problem was in the way the test trajectories were built. For simplicity, early on I made test trajectories as lists of numbers instead of lists of snapshots. However, this created problems in certain parts of the code, because two "snapshots" in this fake trajectory list could have the same value, and the caching behavior assumes that snapshots never repeat in the trajectory.

The change makes the tests run a little slower (getting an order parameter from a snapshot is more expensive than reading a number from a list of them), but at least it's correct and tests pass consistently!

Anyway, this should fix the problem, and can be merged as soon as it passes tests.

@jhprinz

jhprinz commented May 3, 2015

Copy link
Copy Markdown
Contributor

great. Will merge

jhprinz added a commit that referenced this pull request May 3, 2015
@jhprinz
jhprinz merged commit 8567a40 into openpathsampling:master May 3, 2015
dwhswenson added a commit to dwhswenson/openpathsampling that referenced this pull request May 3, 2015
Now all test trajs in testensemble are passed through make_1d_traj. Before,
we added this on the trajs for BackwardPrepended tests. Advanced in openpathsampling#242
make that redundant.
@dwhswenson dwhswenson mentioned this pull request May 3, 2015
5 tasks done
@dwhswenson
dwhswenson deleted the fix_ensemble_testing branch October 26, 2015 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants