Skip to content
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

Add more idata attributes for JAX samplers #7360

Merged
merged 8 commits into from
Jun 17, 2024

Conversation

osyuksel
Copy link
Contributor

@osyuksel osyuksel commented Jun 15, 2024

Description

This PR provides a fix for #7262 by filling in missing post_ attributes keyword argument.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

Copy link

welcome bot commented Jun 15, 2024

Thank You Banner]
💖 Thanks for opening this pull request! 💖 The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

@osyuksel osyuksel marked this pull request as ready for review June 16, 2024 09:53
@osyuksel osyuksel changed the title fix: Missing idata attributes for JAX samplers fix: Missing idata attributes for JAX samplers - PyData 2024 Hackathon Jun 16, 2024
pymc/sampling/jax.py Outdated Show resolved Hide resolved
pymc/sampling/mcmc.py Outdated Show resolved Hide resolved
@osyuksel
Copy link
Contributor Author

Added trailing commas for formatting.

@@ -44,6 +44,10 @@ def test_external_nuts_sampler(recwarn, nuts_sampler):
idata1 = sample(**kwargs)
idata2 = sample(**kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not introduced by you, but why are we sampling twice, is idata2 used anywhere?

@@ -64,8 +68,11 @@ def test_external_nuts_sampler(recwarn, nuts_sampler):
assert "L" in idata1.observed_data
assert idata1.posterior.chain.size == 2
assert idata1.posterior.draw.size == 500
assert idata1.posterior.tuning_steps == 500
np.testing.assert_array_equal(idata1.posterior.x, idata2.posterior.x)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricardoV94 idata2 is used in this line only, to check if the sampling is deterministic I think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay! Thanks for checking

@ricardoV94 ricardoV94 changed the title fix: Missing idata attributes for JAX samplers - PyData 2024 Hackathon Add more idata attributes for JAX samplers Jun 17, 2024
@ricardoV94 ricardoV94 merged commit 5bc6801 into pymc-devs:main Jun 17, 2024
20 checks passed
Copy link

welcome bot commented Jun 17, 2024

Congratulations Banner]
Congrats on merging your first pull request! 🎉 We here at PyMC are proud of you! 💖 Thank you so much for your contribution 🎁

@osyuksel osyuksel deleted the fix/issue-7262 branch June 25, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing idata attributes from jax/numba samplers
3 participants