See test.vi.test_marginal_likelihood.test_marginal_likelihood_joint_distribution_coroutine (also appears in examples/rates-and-dates.ipynb):
Exception ignored in: <bound method WeakStructRef._cleanup of WeakStructRef(StructTuple(
pop_size=HashableWeakRef(<weakref at 0x7f2718609cc0; dead>),
tree=HashableWeakRef(<weakref at 0x7f2718609c20; dead>),
kappa=HashableWeakRef(<weakref at 0x7f27186092c0; to 'Tensor' at 0x7f271921c160>),
frequencies=HashableWeakRef(<weakref at 0x7f27186093b0; to 'Tensor' at 0x7f271921c940>),
clock_rate=HashableWeakRef(<weakref at 0x7f27193d99a0; to 'Tensor' at 0x7f271921c220>),
site_gamma_shape=HashableWeakRef(<weakref at 0x7f27193d9360; to 'Tensor' at 0x7f271921c250>)
))>
Traceback (most recent call last):
File "[/home/christiaan/.pyenv/versions/3.8.13/envs/treeflow/lib/python3.8/site-packages/tensorflow_probability/python/internal/cache_util.py", line 151](http://localhost:8888/home/christiaan/.pyenv/versions/3.8.13/envs/treeflow/lib/python3.8/site-packages/tensorflow_probability/python/internal/cache_util.py#line=150), in _cleanup
self._callback(self)
File "[/home/christiaan/.pyenv/versions/3.8.13/envs/treeflow/lib/python3.8/site-packages/tensorflow_probability/python/internal/cache_util.py", line 221](http://localhost:8888/home/christiaan/.pyenv/versions/3.8.13/envs/treeflow/lib/python3.8/site-packages/tensorflow_probability/python/internal/cache_util.py#line=220), in maybe_del
del self[key]
KeyError: WeakStructRef(StructTuple(
pop_size=HashableWeakRef(<weakref at 0x7f2718609cc0; dead>),
tree=HashableWeakRef(<weakref at 0x7f2718609c20; dead>),
kappa=HashableWeakRef(<weakref at 0x7f27186092c0; to 'Tensor' at 0x7f271921c160>),
frequencies=HashableWeakRef(<weakref at 0x7f27186093b0; to 'Tensor' at 0x7f271921c940>),
clock_rate=HashableWeakRef(<weakref at 0x7f27193d99a0; to 'Tensor' at 0x7f271921c220>),
site_gamma_shape=HashableWeakRef(<weakref at 0x7f27193d9360; to 'Tensor' at 0x7f271921c250>)
))
See
test.vi.test_marginal_likelihood.test_marginal_likelihood_joint_distribution_coroutine
(also appears inexamples/rates-and-dates.ipynb
):