Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create PyMC-specific RV Ops that overwrite _print_name #6201

Closed
larryshamalama opened this issue Oct 11, 2022 · 0 comments · Fixed by #6219
Closed

Create PyMC-specific RV Ops that overwrite _print_name #6201

larryshamalama opened this issue Oct 11, 2022 · 0 comments · Fixed by #6219
Assignees

Comments

@larryshamalama
Copy link
Member

larryshamalama commented Oct 11, 2022

Currently, some RV's _print_names contain the abbreviated version of the random variable Op rather than its full name, e.g. Normal, Cauchy, etc. When it come to displaying them in Graphviz, we resort to its class name via some_op.__class__.__name__, which, to my understanding, is a bit hackish. A solution would look like the following:

PyMCNormalRV(NormalRV):
    _print_name = ("Normal", ...)

pymc_normal = PyMCNormalRV()

class Normal(Continuous):
    rv_op = pymc_normal

In particular, with the newly added SymbolicRVs, this could be helpful (see WIP PR #6149).

CC @ricardoV94 @michaelosthege

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant