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

Port numpyro.render_model() to Pyro #2962

Merged
merged 4 commits into from
Nov 8, 2021
Merged

Port numpyro.render_model() to Pyro #2962

merged 4 commits into from
Nov 8, 2021

Conversation

fritzo
Copy link
Member

@fritzo fritzo commented Nov 5, 2021

Resolves #2957

This ports numpyro.render_model() nearly verbatim to pyro.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:

numpyro.render_model() was very helpful! It felt almost like numpyro is a probabilistic model rendering library that happened to also perform inference. I couldn't figure out what this numpyro.plate thing was until I could play around with models and see how their plate structured worked visually.

Ported functions and files:

Tested

  • tutorial is added to test harness
  • checked rendering and doc links manually

@fritzo fritzo requested a review from fehiepsi November 5, 2021 19:04
@fritzo fritzo mentioned this pull request Nov 5, 2021
2 tasks
@fritzo fritzo removed the request for review from fehiepsi November 5, 2021 20:01
@fritzo fritzo added the WIP label Nov 5, 2021
fehiepsi
fehiepsi previously approved these changes Nov 7, 2021
Copy link
Member

@fehiepsi fehiepsi left a 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.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: lists -> list

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks for catching!

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

Successfully merging this pull request may close these issues.

[FR] Backport numpyro.render_model()
2 participants