Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove random number seeds in tests #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove random number seeds in tests #63

wants to merge 1 commit into from

Conversation

kimt33
Copy link
Collaborator

@kimt33 kimt33 commented Apr 5, 2018

The goal is to remove the random number seeds in tests so that the tests are not system dependent. Addresses Issue #59

@kimt33
Copy link
Collaborator Author

kimt33 commented Apr 5, 2018

Turns out that this is not quite as simple as I thought because some of the random numbers are generated in places where we cannot simply overwrite the random numbers with the user specified ones. Additional structures (especially in the case of test_rank2_approx.py) are needed to allow "overwriting" the random number generation.

The alternative would be to run the calculation multiple times and exit when at least one succeeds (but there are no guarantees still)

kimt33 added a commit that referenced this pull request May 26, 2018
Skip test `test_rank2_geminal_template_params` because it does not work
all the time. In producing `template_params`, random noise is added and
some of the random noise would cause errors.

This test is skipped to play well with Travis. At the moment, rank2
approximation is not too important, so it is not absolutely essential to
fully cover the code.

Issue #59 and PR #63 address this problem, but it is not yet resolved.
Until it become resolved, this test can be skipped
1. Remove seed in test_math_tools, test_chemical
2. Cannot remove seed in test_doci because the random number is
   generated inside cma module
3. Cannot remove seed in test_rank2_approx because the random number
   is generated inside property template_params
kimt33 added a commit that referenced this pull request Aug 8, 2019
Since random numbers are introduced, the template_params is not
determininstic and causes some headache with testing on different
systems (see Issue #59 and PR #63). Even still, random numbers are
introduced to easily obtain "unbaised" denominator that gives
determinant that are approximately 1 (at the very least, nonsingular)
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.

1 participant