Skip to content

Commit 162ad6c

Browse files
Prior predictions constant data (#5723)
* support return constant_data with prior pred * pre-commit format * added test * code review
1 parent d322f75 commit 162ad6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymc/backends/arviz.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ def observed_data_to_xarray(self):
464464
default_dims=[],
465465
)
466466

467-
@requires(["trace", "predictions"])
468467
@requires("model")
469468
def constant_data_to_xarray(self):
470469
"""Convert constant data to xarray."""

pymc/tests/test_idata_conversion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def test_no_trace(self):
502502

503503
@pytest.mark.parametrize("use_context", [True, False])
504504
def test_priors_separation(self, use_context):
505-
"""Test model is enough to get prior, prior predictive and observed_data."""
505+
"""Test model is enough to get prior, prior predictive, constant_data and observed_data."""
506506
with pm.Model() as model:
507507
x = pm.MutableData("x", [1.0, 2.0, 3.0])
508508
y = pm.ConstantData("y", [1.0, 2.0, 3.0])
@@ -514,6 +514,7 @@ def test_priors_separation(self, use_context):
514514
"prior": ["beta", "~obs"],
515515
"observed_data": ["obs"],
516516
"prior_predictive": ["obs"],
517+
"constant_data": ["x", "y"],
517518
}
518519
if use_context:
519520
with model:

0 commit comments

Comments
 (0)