# Support for declarative graphic modeling language such as WinBUGS format?

**URL:** <https://discourse.pymc.io/t/support-for-declarative-graphic-modeling-language-such-as-winbugs-format/10321>\
**Category:** Development\
**Tags:** modeling\
**Created:** [September 6, 2022, 10:44pm UTC](https://discourse.pymc.io/t/support-for-declarative-graphic-modeling-language-such-as-winbugs-format/10321 "2022-09-06T22:44:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ligonliu](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/ligonliu/32/2411_2.png) [@ligonliu](https://discourse.pymc.io/u/ligonliu)\
**Post date:** [September 6, 2022, 10:44pm UTC](https://discourse.pymc.io/t/support-for-declarative-graphic-modeling-language-such-as-winbugs-format/10321/1 "2022-09-06T22:44:40Z")

</div>

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).

[1][ModelSpecification](https://www.multibugs.org/documentation/latest/ModelSpecification.html)

---

<div class="post-metadata">

**Author:** ![ricardoV94](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/ricardov94/32/5775_2.png) [@ricardoV94](https://discourse.pymc.io/u/ricardoV94)\
**Post date:** [September 7, 2022, 5:53am UTC](https://discourse.pymc.io/t/support-for-declarative-graphic-modeling-language-such-as-winbugs-format/10321/2 "2022-09-07T05:53:47Z")

</div>

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
