Hierarchical Model - Slow Sampling ( 1.8 sec per draw ) - Primary suspect is how the multi-level hierarchy is coded

Hi @tcapretto. I’m not sure these models are doing the same thing because the graphviz is showing a very different model structure.

model_bmb.build()
gv = pm.model_to_graphviz(model_bmb.backend.model)
gv.format = 'png'
gv.render(filename='model_graph',)

pm.model_to_graphviz(model_bmb.backend.model)