Conversation
The docs are rough/wrong and the code isn't using any of this yet.
Ran the ball drop notebook to see it fail with correct error message since a scipy.stats RNG was not being set into surmise yet. Passing once I added in the set_RNG call. The pytest tests are failing because they haven't set the RNG either. I'll let Moses do that.
Contributor
Author
|
@mosesyhc Can you please propagate the use of the new global surmise RNG throughout the code base. Please see the changes made so far to see what I have already done (
|
…n addition, to unset an RNG
… any collection-time error
(1) Ensure that no surmise RNG is used except within test functions (2) Reduce redundancy in calling shared variables from shared_scenario.py (3) Allow for fixtures to be called by test to ensure "no_rng" (RNG cleared), "seeded_RNG" (surmise RNG set properly)
Member
|
A Jupyterbook page is added to illustrate the use of surmise RNG and reproducible results. Guides and README are modified to include a link to the Jupyterbook (minimally here, the JB reference should be made explicit and prominent in the release.) @jared321 ready for your review. (realizing that this will be a self-review because you initiated the PR) |
As expected, the new results were not identical to the benchmark. However, the new results look reasonable.
Random draws not using the global RNG. Internal tests probably shouldn't override the underlying failure message, but rather only print more information to help understand the context of the failure. This should hopefully get actions passing again.
mosesyhc
approved these changes
Jul 16, 2026
mosesyhc
left a comment
Member
There was a problem hiding this comment.
Reviewed via
- the running of Jupyterbook
- manually clear RNG and confirm failure
- set same RNG seeds to confirm reproducibility
- set different RNG seeds to confirm that different samples are drawn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tentative PR Self-review