-
Notifications
You must be signed in to change notification settings - Fork 657
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
Improve Unit tests by moving random seeds to setUp #2267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @krishnakalyan3, thanks for the PR! Some test methods still use seed
when calling get_whitenoise
. For example, the methods under datasets test. Could you also address them in this PR?
@zhangguanheng66 This is intended design. The problem that the original PR was solving is automatically setting the seed of the library code that is run. If seed is not reset at the start of every test run, the test results end up depend on the order the test is executed. Test utilities allowing explicit seed is the right thing to do, otherwise it will implicitly depend on the global seed state, which could interfere the library code behavior. @krishnakalyan3 the initial state of the PR looked fine. Can you revert the latest commit? ( |
Following up on #2033.