-
-
Notifications
You must be signed in to change notification settings - Fork 984
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
Port numpyro.render_model() to Pyro #2962
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! The provenance one is nice.
pyro/infer/inspect.py
Outdated
sample sites on which it depend; | ||
- "sample_dist" maps each sample site to the name of the distribution at | ||
that site; | ||
- "plate_sample" maps each plate name to a lists of the sample sites |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: lists -> list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks for catching!
Resolves #2957
This ports
numpyro.render_model()
nearly verbatim topyro.render_model()
, including the tutorial.I've prioritized this because of a recent user story: a scientist wanted to learn Pyro/NumPyro, and eventually chose NumPyro because the learning curve was less steep. This scientist said:
Ported functions and files:
get_model_relations()
is simpler than in numpyro, due to @ordabayevy'sProvenanceTensor
Support discrete variables in get_dependencies() via ProvenanceTensor #2959generate_graph_specification()
is copied nearly verbatimrender_graph
is copied nearly verbatimrender_model
is copied nearly verbatimmodel_rendering.ipynb
is copied nearly verbatimTested