You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wasn't sure which repo this belongs in. If you marginalize a discrete variable with MarginalModel then call freeze_dims_and_data, the marginalization is undone:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[19], line 1
----> 1 pm.inputvars(freeze_dims_and_data(m).logp())
File ~/mambaforge/envs/readystate-bonds/lib/python3.11/site-packages/pymc/model/core.py:742, in Model.logp(self, vars, jacobian, sum)
740 rv_logps: list[TensorVariable] = []
741 if rvs:
--> 742 rv_logps = transformed_conditional_logp(
743 rvs=rvs,
744 rvs_to_values=self.rvs_to_values,
745 rvs_to_transforms=self.rvs_to_transforms,
746 jacobian=jacobian,
747 )
748 assert isinstance(rv_logps, list)
750 # Replace random variables by their value variables in potential terms
File ~/mambaforge/envs/readystate-bonds/lib/python3.11/site-packages/pymc/logprob/basic.py:630, in transformed_conditional_logp(rvs, rvs_to_values, rvs_to_transforms, jacobian, **kwargs)
628 rvs_in_logp_expressions = _find_unallowed_rvs_in_graph(logp_terms_list)
629 if rvs_in_logp_expressions:
--> 630 raise ValueError(RVS_IN_JOINT_LOGP_GRAPH_MSG % rvs_in_logp_expressions)
632 return logp_terms_list
ValueError: Random variables detected in the logp graph: {bernoulli_rv{"()->()"}.out}.
This can happen when DensityDist logp or Interval transform functions reference nonlocal variables,
or when not all rvs have a corresponding value variable.
The text was updated successfully, but these errors were encountered:
Wasn't sure which repo this belongs in. If you marginalize a discrete variable with
MarginalModel
then callfreeze_dims_and_data
, the marginalization is undone:Full Traceback
The text was updated successfully, but these errors were encountered: