-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add more idata attributes for JAX samplers #7360
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
Changes from 4 commits
a9bfe9f
bb3a9c2
c8ccea4
c41ee0f
949455b
bbe0fe9
b8e157d
fda9222
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,10 @@ def test_external_nuts_sampler(recwarn, nuts_sampler): | |
idata1 = sample(**kwargs) | ||
idata2 = sample(**kwargs) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
|
||
reference_kwargs = kwargs.copy() | ||
reference_kwargs["nuts_sampler"] = "pymc" | ||
idata_reference = sample(**reference_kwargs) | ||
|
||
warns = { | ||
(warn.category, warn.message.args[0]) | ||
for warn in recwarn | ||
|
@@ -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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ricardoV94 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah okay! Thanks for checking |
||
|
||
assert idata_reference.posterior.attrs.keys() == idata1.posterior.attrs.keys() | ||
|
||
|
||
def test_step_args(): | ||
with Model() as model: | ||
|
Uh oh!
There was an error while loading. Please reload this page.