-
Notifications
You must be signed in to change notification settings - Fork 344
Use pymc.testing for injected code in notebook runner #2095
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
Conversation
|
@copilot add the implementation of the fi, now there is nothing |
|
@copilot add the implementation of the fi, now there is nothing |
|
The sample_stats in the mock is not in latest pymc version just yet so this is blocked. Ref the latest two: |
|
@copilot , go get PyMC team to make a new release |
Co-authored-by: juanitorduz <[email protected]>
|
|
@williambdean, why are the tests 🟢 ? 🤔 |
What is being done works. However, with the latest version, it can just be mock_sample = partial(pymc.testing.mock_sample, sample_stats={"diverging": lambda size: np.zeros(size=size)})There will just be another iteration on this |
|
so shall we merge this one already @williambdean ? (pymc releases can take some time) |
Description
Replaces custom
mock_sampleimplementation withpymc.testing.mock_samplefrom PyMC's standardized testing module (added in pymc-devs/pymc#7887).Changes:
pymc.testing.mock_sampleas base implementationsample_statsgroup for notebook compatibility (divergence checks).sizesinstead of.dimsdivergingdtype:boolinstead ofintBefore:
After:
Reduces code duplication, maintains notebook compatibility, improves maintainability.
Related Issue
Checklist
Original prompt
pymc.testingfor injected code in notebook runner #2032💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
📚 Documentation preview 📚: https://pymc-marketing--2095.org.readthedocs.build/en/2095/