Understanding pytensor's API vs pymc's API and which is more appropriate to use for a new project #1547
Replies: 3 comments 4 replies
-
It sounds like you'll be reinventing less things if you build on top of PyMC (and reuse PyMC models) instead of directly on PyTensor. Also for some related functionality: https://www.pymc.io/projects/extras/en/stable/generated/pymc_extras.prior.Prior.html The tests may be more readable: https://github.com/pymc-devs/pymc-extras/blob/main/tests/test_prior.py |
Beta Was this translation helpful? Give feedback.
-
@kratsg I wrote this snippet (by no means completely fleshed out), for another project with the aim of making it easier to work with PyTensor as a dev: https://gist.github.com/ricardoV94/a51785d4199b8c14ce0d337f2b437772#file-pytensor_jit-py |
Beta Was this translation helpful? Give feedback.
-
Also note we may soon be opening a repo with common distribution functions (logpdf, logcdf, moments ... etc) written in PyTensor that other packages can use (and contribute to) to avoid duplicated work (or depending on a package like PyMC just to use this very restricted functionality): pymc-devs/distributions#1 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Following up from #1545 (reply in thread) .
The project: pyhs3. The README contains a hello-world example with the expect API using the HEP Statistics Serialization Standard (HS3) specification:
Hello World example
At the pytensor level, the
gaussian_dist
was re-implemented here :https://github.com/scipp-atlas/pyhs3/blob/0c3e46961d4ce7da2c12088e6ef4f210d16acffd/src/pyhs3/distributions.py#L118-L218 . It's not abundantly clear if this is duplication, or if one can usepymc
instead.Related issue: scipp-atlas/pyhs3#72
./cc @ricardoV94 .
Beta Was this translation helpful? Give feedback.
All reactions