pymc-devs / pymc-experimental

https://pymc-experimental.readthedocs.io
Other
72 stars 46 forks source link

use dict instead of treedict in marginalized model #291

Closed ferrine closed 6 months ago

ferrine commented 6 months ago

Treedict was intended for nested usecase, where there are submodels like in https://github.com/pymc-devs/pymc/blob/main/pymc/model/core.py#L529, https://github.com/pymc-devs/pymc/blob/main/pymc/model/core.py#L478 . But marginalized model is not supposed to be used like that, so the functionality can be removed and simplified

https://github.com/pymc-devs/pymc-experimental/blob/4f75687346cb67cfb794dad00bc2cac52066a8b7/pymc_experimental/model/marginal_model.py#L17

zaxtax commented 6 months ago

I can't remove the use of treedict for named_vars since it is expected to be a treedict https://github.com/pymc-devs/pymc/blob/main/pymc/model/core.py#L1427