It looks like we need to convert model graphs into AePPL IR and operate on those, because construct_sampler/construct_ir_fgraph only supports observed RandomVariables and not general MeasurableVariables.
aemcmc/basic.py:40: in construct_sampler
fgraph, obs_rvs_to_values, memo, new_to_old_rvs = construct_ir_fgraph(
aemcmc/rewriting.py:91: in construct_ir_fgraph
obs_rvs_to_values = {memo[k]: v for k, v in obs_rvs_to_values.items()}
aemcmc/rewriting.py:91: in <dictcomp>
obs_rvs_to_values = {memo[k]: v for k, v in obs_rvs_to_values.items()}
E KeyError: Elemwise{add,no_inplace}.0
It looks like we need to convert model graphs into AePPL IR and operate on those, because
construct_sampler
/construct_ir_fgraph
only supports observedRandomVariable
s and not generalMeasurableVariable
s.An example: