Support for declarative graphic modeling language such as WinBUGS format?

Right now pymc3 don’t have a text format to save and load pymc models for editing and interoperation with other software.
Is there plan to support import/export to declarative languages for graphic modeling, such as the WinBUGS format[1]? or maybe a flat format (BUGS format has for loops).


There are no plans for such functionality. But PyMC models are already graphs like that so you could definitely convert them to a textual or graphical representation with some effort.

This is easier in PyMC V4 than V3. You can call aesara.dprint on model.free_RVs for one example of textual representation or aesara.debug.pydotprint for a graphical representation. pm.model_to_graphviz is another graphical representation that ommits the mathematical operations between variables. There is (was?) also a project that converted Aesara graphs to SymPy.

Do note that Aesara/PyMC are tensor-focused and allow many tensor operations that might not translate well to BUGS

1 Like