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

Add Pyro example #109

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Add Pyro example #109

merged 3 commits into from
Aug 12, 2024

Conversation

SamDuffield
Copy link
Contributor

@SamDuffield SamDuffield commented Aug 2, 2024

Adds example using pyro to define a model and compares against pyro and blackjax.

Also updates VI to not use torch.vmap in the case n_samples=1 since many models do not compose with torch.vmap.

Copy link
Contributor

@KaelanDt KaelanDt left a comment

Choose a reason for hiding this comment

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

Feels a bit heavyweight for an example. What do you think of adding a simple notebook that shows the comparison between different libraries and prints out runtimes?

examples/pyro_pima_indians/plot_marginals.py Show resolved Hide resolved
@SamDuffield
Copy link
Contributor Author

SamDuffield commented Aug 12, 2024

Feels a bit heavyweight for an example. What do you think of adding a simple notebook that shows the comparison between different libraries and prints out runtimes?

That would be quite a long notebook, as it would need all of the bespoke code for each library.

But for sure it is heavyweight, this is due to it being replicable simulations to add to the paper rather than a pure example. I think we can solve this by adding a small extra notebook that demonstrates how to define a model in pyro and then inference with posteriors. I'll raise an issue for this

@SamDuffield SamDuffield merged commit 1a7eeba into main Aug 12, 2024
2 checks passed
@SamDuffield SamDuffield deleted the pyro-example branch August 12, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants