Skip to content

Call for User-Contributed Examples and Tutorials! #1461

Open

Description

@martinjankowiak

Goal

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!

Activity

  1. added
    help wantedIssues suitable for, and inviting external contributions
    and removed
    help wantedIssues suitable for, and inviting external contributions
    on Oct 17, 2018
  2. martinjankowiak commented on Oct 17, 2018

    @martinjankowiak
    CollaboratorAuthor

    Some people we'd love to hear from include (no pressure though!):
    @mbabadi @chart90 @robertness @desmond-ong @wsgharvey @justinchiu @stuhlmueller @mhw32 @null-a

  3. desmond-ong commented on Oct 18, 2018

    @desmond-ong

    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.

  4. maedoc commented on Oct 24, 2018

    @maedoc

    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

  5. SourabhKul commented on Nov 18, 2018

    @SourabhKul

    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.

  6. martinjankowiak commented on Nov 20, 2018

    @martinjankowiak
    CollaboratorAuthor

    @SourabhKul sounds like it could be useful. can you please give some more details?

  7. 11 remaining items

  8. patrickeganfoley commented on Sep 6, 2019

    @patrickeganfoley
    Contributor

    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.

  9. martinjankowiak commented on Sep 6, 2019

    @martinjankowiak
    CollaboratorAuthor

    @patrickeganfoley that would be great! i know at least two people who would love to see that

  10. fehiepsi commented on Sep 6, 2019

    @fehiepsi
    Member

    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.

  11. pinned this issue on Sep 6, 2019
  12. deepaks4077 commented on Dec 31, 2019

    @deepaks4077

    @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.

  13. JamesTrick commented on Mar 24, 2020

    @JamesTrick
    Contributor

    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

  14. EvanZ commented on Jan 3, 2021

    @EvanZ

    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

  15. eb8680 commented on Jan 6, 2021

    @eb8680
    Member

    @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.

  16. EvanZ commented on Jan 13, 2021

    @EvanZ

    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!

  17. EvanZ commented on Jan 31, 2021

    @EvanZ

    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

  18. unpinned this issue on Apr 21, 2021
  19. pinned this issue on Apr 21, 2021
  20. jaronowitz commented on Jun 12, 2021

    @jaronowitz

    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!

  21. martinjankowiak commented on Jun 12, 2021

    @martinjankowiak
    CollaboratorAuthor

    @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

  22. Dom-Sco commented on Dec 29, 2025

    @Dom-Sco

    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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions