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
{{ message }}
Repository navigation
Call for User-Contributed Examples and Tutorials! #1461
Add creative examples of Pyro code developed by users out in the real world to our catalog of examples and tutorials. This is great for the community as a whole and helps the Pyro dev team focus on features that are useful to you and the broader community.
Context
The Pyro dev team met a bunch of Pyro users at ProbProg 2018 and heard about a variety of interesting applications of Pyro.
What is being asked
We realize that writing a clean piece of code that can be read by and is useful to a wide audience is difficult. We are also aware that some code/data cannot easily be made public. Wherever possible we are eager to help you overcome some of these potential barriers by
helping you clean up and comment your contributed code (and possibly add CUDA support)
help you find alternative datasets when needed
help you extract a smaller example of Pyro usage from a larger context
Who?
Anyone reading this!
Reacted by Fritz Obermeyer, eb8680, Du Phan, Sourabh Kulkarni, Kelly Buchanan, Ahmad Salim Al-Sibahi, Petar Sarajcev, Jeff Hale, Ravi Teja Gutta, Qi Luo and 3 more
happy to contribute! @ndgAtUber and I have some stuff baking right now (and an application paper that should be accepted soon), so hopefully soon, we'll have something in a shape to have the dev team take a look at.
sorry to jump on here, (but I could neither join the forum by github or direct sign up (I never received the verification email)), I would like to not only +1 this issue, but also suggest that porting example models from other software (e.g. Stan) would save potential users a lot of time. In my case, it took me a few hours to figure out how to write down a simple AR model (which is my fault more that anything), and having this example (which is given in the Stan guide) would've gotten me jump started.
Also, examples to get users get started transitioning from CPU to GPU would be helpful (where I'm currently stuck).
Btw I'd be happy to trade my AR example for tips on getting it working for CUDA, which could be attractive for Pyro since it (AR) is a stepping stone to ODE/SDE support.
edit I figured out the CUDA problem was part of using autoguides (they need their params predefined on the cuda device), but this could be mentioned in the docs or an example.
edit 2 put in bold the contribution to this issue to distinguish from my whining
Reacted by Fritz Obermeyer, Petar Sarajcev and Brandon B
Would a vanilla Bayesian Network implementing a heart disease example be a good example/tutorial?
I have it coded in python from scratch and could try to port it.
Reacted by tjohnson250, Michael Pieler and Nikhil Kasukurthi
Just made a super simple classic ELO model for NCAA Men's Basketball 2002-2018 here. Would you be interested in it as an example if I cleaned it up a bit?
Super pumped to be able to have the variational posterior on the team quality terms - it's cool you can see that the D2/D3 teams that only play a few games a year have very high uncertainty.
@martinjankowiak: I've been meaning to use Pyro for a causal inference in genomics task (to conduct a GWAS). I already have the code to generate a decent amount of synthetic data. I could make it more complicated by adding some latent confounding as well. What do you guys think? My code is all in Pytorch so it'll be reasonably instructive to port it to Pyro.
@EvanZ these look awesome! I have been meaning to create a community tutorials/examples page on our website highlighting externally hosted examples, and your projects look like a great incentive for me to finish that. Have you been publishing them anywhere that I should link to, e.g. as blog entries?
We would also be happy to host them here along with the rest of the Pyro examples - if you would prefer that option, please open separate pull requests for each notebook.
Would there be interest in an example concerning solving multiarmed bandits using randomized probability matching? I'm really excited about Pyro and would love to be able to contribute!
@jaronowitz sure sounds great! feel free to start by opening an issue to discuss scope/details or just directly submit a PR if you have a good idea of what you'd like to contribute. either way we're happy to offer advice and suggestions, help improve the code, etc
It includes a walk-through of some of the mathematics behind Pyro and a few small example uses of the library. This tutorial is aimed at helping users who are new to Pyro and probabilistic programming. I’m happy to adjust the content of the tutorial further based on reviewer suggestions.
If this would be useful as an example/tutorial linked from the docs or examples repository, I’m glad to help with any modifications to make it fit the project’s standards.
Activity
martinjankowiak commentedon Oct 17, 2018
Some people we'd love to hear from include (no pressure though!):
@mbabadi @chart90 @robertness @desmond-ong @wsgharvey @justinchiu @stuhlmueller @mhw32 @null-a
desmond-ong commentedon Oct 18, 2018
happy to contribute! @ndgAtUber and I have some stuff baking right now (and an application paper that should be accepted soon), so hopefully soon, we'll have something in a shape to have the dev team take a look at.
maedoc commentedon Oct 24, 2018
sorry to jump on here, (but I could neither join the forum by github or direct sign up (I never received the verification email)), I would like to not only +1 this issue, but also suggest that porting example models from other software (e.g. Stan) would save potential users a lot of time. In my case, it took me a few hours to figure out how to write down a simple AR model (which is my fault more that anything), and having this example (which is given in the Stan guide) would've gotten me jump started.
Also, examples to get users get started transitioning from CPU to GPU would be helpful (where I'm currently stuck).
Btw I'd be happy to trade my AR example for tips on getting it working for CUDA, which could be attractive for Pyro since it (AR) is a stepping stone to ODE/SDE support.
edit I figured out the CUDA problem was part of using autoguides (they need their params predefined on the cuda device), but this could be mentioned in the docs or an example.
edit 2 put in bold the contribution to this issue to distinguish from my whining
SourabhKul commentedon Nov 18, 2018
Would a vanilla Bayesian Network implementing a heart disease example be a good example/tutorial?
I have it coded in python from scratch and could try to port it.
martinjankowiak commentedon Nov 20, 2018
@SourabhKul sounds like it could be useful. can you please give some more details?
11 remaining items
patrickeganfoley commentedon Sep 6, 2019
Just made a super simple classic ELO model for NCAA Men's Basketball 2002-2018 here. Would you be interested in it as an example if I cleaned it up a bit?
Super pumped to be able to have the variational posterior on the team quality terms - it's cool you can see that the D2/D3 teams that only play a few games a year have very high uncertainty.
martinjankowiak commentedon Sep 6, 2019
@patrickeganfoley that would be great! i know at least two people who would love to see that
fehiepsi commentedon Sep 6, 2019
Sorry for an interuption. I have no idea why I did unpin/pin this thread. :( I'll revert this back to the original pinned thread.
deepaks4077 commentedon Dec 31, 2019
@martinjankowiak: I've been meaning to use Pyro for a causal inference in genomics task (to conduct a GWAS). I already have the code to generate a decent amount of synthetic data. I could make it more complicated by adding some latent confounding as well. What do you guys think? My code is all in Pytorch so it'll be reasonably instructive to port it to Pyro.
Also, @martinjankowiak : This could be a nice project for GSoc 2020.
JamesTrick commentedon Mar 24, 2020
I've just started the process of (likely slowly) porting examples from Bayesian Data Analysis by Gelman et. al. to Pyro which may be of interest. Repo is here
EvanZ commentedon Jan 3, 2021
I have a couple of projects involving Pyro and basketball:
Bayesian Neural Network Win Probability
https://github.com/EvanZ/bayesian-win-probability/blob/master/bayes-wp.ipynb
NBA Player Ratings Model
https://github.com/EvanZ/ppl-pm/blob/main/xpm.ipynb
Bayesian Meta-Mock Draft (Aggregating Draft Rankings)
https://github.com/EvanZ/bayesian-meta-mock/blob/master/bayesian-meta-mock-draft.ipynb
eb8680 commentedon Jan 6, 2021
@EvanZ these look awesome! I have been meaning to create a community tutorials/examples page on our website highlighting externally hosted examples, and your projects look like a great incentive for me to finish that. Have you been publishing them anywhere that I should link to, e.g. as blog entries?
We would also be happy to host them here along with the rest of the Pyro examples - if you would prefer that option, please open separate pull requests for each notebook.
EvanZ commentedon Jan 13, 2021
Hi @eb8680 sorry didn't get back sooner. No, I've really just been putting them in git repos. Feel free to link to those!
EvanZ commentedon Jan 31, 2021
Here's another post I made yesterday.
Are The Boston Celtics Better Than Random In Preventing Wide Open 3s?
https://github.com/EvanZ/open_3pt_inference/blob/master/inference.ipynb
jaronowitz commentedon Jun 12, 2021
Would there be interest in an example concerning solving multiarmed bandits using randomized probability matching? I'm really excited about Pyro and would love to be able to contribute!
martinjankowiak commentedon Jun 12, 2021
@jaronowitz sure sounds great! feel free to start by opening an issue to discuss scope/details or just directly submit a PR if you have a good idea of what you'd like to contribute. either way we're happy to offer advice and suggestions, help improve the code, etc
Dom-Sco commentedon Dec 29, 2025
Hi all,
I came across this thread and wanted to share a beginner-oriented Pyro tutorial I recently wrote that focuses on core ideas and practical use:
https://dom-sco.github.io/OtherML/bayes.html
It includes a walk-through of some of the mathematics behind Pyro and a few small example uses of the library. This tutorial is aimed at helping users who are new to Pyro and probabilistic programming. I’m happy to adjust the content of the tutorial further based on reviewer suggestions.
If this would be useful as an example/tutorial linked from the docs or examples repository, I’m glad to help with any modifications to make it fit the project’s standards.
Thanks for the great work on Pyro!
— Dom