Closed ricardoV94 closed 2 weeks ago
I wonder how .to_graphviz looks for hierarchical models 🤔
Doesn't do anything different for the outer model. You can just call .to_graphviz
on submodels and will only show the variables that belong to it IIRC
Description
This PR allows setting
model=None
to explicitly disable model nesting. This is needed for model transformationsdo, observe, clone, remove_value_transforms, freeze_rv_and_dims
to be possible under a model context without side-effects on the original model.I still think model nesting is an overkill, but a lot of code out there depends on it so I am not touching it.
I also updated the docstrings with more relevant (imo) examples. The previous example was broken as per #6715 and I am not sure we really want to incentivize people to subclass PyMC models. That certainly shouldn't be the focus of the docstrings?
Finally, removed deprecated functionality.
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7352.org.readthedocs.build/en/7352/