Skip to content

Commit

Permalink
Use model argument in Evaluator when getting model context (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandalt authored Nov 3, 2023
1 parent 91b8026 commit 6ba1a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pymc_ext/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, outs, model=None, **kwargs):
# In PyMC >= 5, model context is required to replace rvs with values
# https://github.com/pymc-devs/pymc/pull/6281
# https://www.pymc.io/projects/docs/en/stable/learn/core_notebooks/pymc_pytensor.html#pymc
model = pm.modelcontext(None)
model = pm.modelcontext(model)
if isinstance(outs, (tuple, list)):
self.out_values = model.replace_rvs_by_values(outs)
else:
Expand Down

0 comments on commit 6ba1a27

Please sign in to comment.