-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Remove SeededTest
class
#6799
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 SeededTest
class
#6799
Conversation
Some tests are fails after removing |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6799 +/- ##
==========================================
- Coverage 92.05% 87.68% -4.38%
==========================================
Files 96 95 -1
Lines 16376 16315 -61
==========================================
- Hits 15075 14305 -770
- Misses 1301 2010 +709
|
101d330
to
6e08012
Compare
6e08012
to
4063897
Compare
@ricardoV94 , @twiecki Could you please review this PR when you will have some time? |
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.
Looks pretty good. Small question and suggestion below
@@ -44,4 +44,4 @@ def strict_float32(): | |||
@pytest.fixture(scope="function", autouse=False) | |||
def seeded_test(): | |||
# TODO: use this instead of SeededTest | |||
np.random.seed(42) | |||
np.random.seed(20160911) |
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.
Any reason for this change?
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.
I found some test that fails with random seed 42 - the result differs from expected just a little bit more than the selected threshold value. That is why I decided to use here value from the SeededTest
class for random seed.
Why not using a fixture with autouse? |
For what? The point in that global seeding doesn't do anything in PyMC anymore so each test should create a generator/seed to pass to the functions that need seeding. Do you mean a fixture to create such a seed? |
@ricardoV94 I think @ferrine ask about pytest fixture autouse argument to apply |
I don't think we need/should do that. If anything we should move away from using any numpy RandomState stuff, so the fixture would be useless. Let me know if I am missing something? |
There's a conflict with main now. Otherwise I think it's good to merge |
6fcaf80
to
d2475c9
Compare
Thanks @aerubanov! |
This PR remove
SeededTest
class and close #6234📚 Documentation preview 📚: https://pymc--6799.org.readthedocs.build/en/6799/