You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With v4 (see #4463), we move away from Distribution in favour of aesara's RandomVariable. The current machinery for generating human-readable str representations depends on some OOP stuff in Distribution and subclasses. These string representations were also used in generating GraphViz graphs.
I'm opening this issue to discuss the best way to maintain current str and graph functionality when moving forward to v4. I'm happy to do the coding, but will need some input from @brandonwillard (and others) first.
For now I have two (probably naive) questions that should hopefully allow me to get this started:
If I have x = pm.Normal('x', mu=0, sigma=1.0), what is the best way to access x's parameters after instantation? Right now (v3) I can just do x.distribution.mu, but this no longer works when x is a TensorVariable. I know that these parameters are TensorConstants somewhere in x's parent hierarchy, but so far I've not found a convenient way to access them using their parameter names. 2. I saw that there are _print_name properties in aesara.tensor.random.basic.NormalRV etc., but so far these appear unused, is that correct? Found their use in symbolic-pymc I think!
The text was updated successfully, but these errors were encountered:
There is a Theano/Aesara-based random variable printer in symbolic_pymc.theano.printing that uses Theano/Aesara's built-in printing framework. It produces both text-based and LaTeX output (e.g. here's a text example and here's a LaTeX example). We can always use/adapt that code.
With v4 (see #4463), we move away from
Distribution
in favour of aesara'sRandomVariable
. The current machinery for generating human-readablestr
representations depends on some OOP stuff inDistribution
and subclasses. These string representations were also used in generating GraphViz graphs.I'm opening this issue to discuss the best way to maintain current
str
and graph functionality when moving forward to v4. I'm happy to do the coding, but will need some input from @brandonwillard (and others) first.For now I have two (probably naive) questions that should hopefully allow me to get this started:
x = pm.Normal('x', mu=0, sigma=1.0)
, what is the best way to accessx
's parameters after instantation? Right now (v3) I can just dox.distribution.mu
, but this no longer works whenx
is aTensorVariable
. I know that these parameters areTensorConstant
s somewhere inx
's parent hierarchy, but so far I've not found a convenient way to access them using their parameter names.2. I saw that there areFound their use in symbolic-pymc I think!_print_name
properties inaesara.tensor.random.basic.NormalRV
etc., but so far these appear unused, is that correct?The text was updated successfully, but these errors were encountered: