-
Notifications
You must be signed in to change notification settings - Fork 8
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
gh-385: set random seeds in all glass functions used in notebooks #389
Conversation
Leverage the `rng` input to all functions in `glass` so that the notebook figures should always be the same when run again.
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.
Nice, maintainability 📈
Thanks, @paddyroddy
@ntessore can you have a look? |
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.
Great effort to make the outputs more stable. There's one notebook that doesn't do any sampling, but still gets a rng
.
In a separate change, we probably want to add a matplotlibrc or similar to control at least the resolution of the notebook figures – you can see here that the images still depend on who generated them.
Closes #385.
Leverage the
rng
input to all functions inglass
so that the notebook figures should always be the same when run again.Also add https://github.com/kynan/nbstripout with
--keep-output
which will clear the metadata of the notebooks but make sure figures are still shown.Have tested this by running the notebooks in full and running
pre-commit
, and committing. Then executing in full again and runningpre-commit
and checking if anything changed - which it hadn't.