-
-
Notifications
You must be signed in to change notification settings - Fork 985
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
Call for User-Contributed Examples and Tutorials! #1461
Comments
Some people we'd love to hear from include (no pressure though!): |
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 |
Would a vanilla Bayesian Network implementing a heart disease example be a good example/tutorial? |
@SourabhKul sounds like it could be useful. can you please give some more details? |
@martinjankowiak This work was a homework assignment in a PGM class I took. The code is available here. It is a 9-node Bayesian network, with categorical variables (Heart rate, age, gender etc.). In the tutorial I could show how to instantiate the Bayesian network (nodes, edges), populate CPTs through maximum likelihood estimate and perform exact as well as sampling based inference. It could be helpful for users to model their own Bayesian Networks using this tutorial, and going forward it may be helpful to natively support Bayesian Networks in pyro. I am new to pyro as well as new to contributing to open source and this would be an interesting first project. I can also do tutorials for other basic PGMs like Markov random fields, And some more advanced examples like Stochastic variational inference over factor analysis model and other mixture models. |
@SourabhKul sure that sounds great. i suggest you start with a pretty minimal version and try to keep your first PR from getting too large. improvements can always be added in follow-up PRs. it's also probably best to keep abstractions to a minimum, since too many abstractions can make it harder for readers to parse example code. |
Hey @martinjankowiak, allow me to suggest something. I'm sure the Bayesian literature has collected plenty of tutorial data sets and tasks over the years (think counterparts for MNIST/CIFAR/COCO from the DL world). It would be a good idea to create issues tagged with "Help Wanted" or "Examples" which state those problems. Anyone interested (including me) to explore the Pyro API and Bayesian Learning in general can help contribute. Eventually, we can reach feature parity against the literature. Not sure if this aligns with the goals of Pyro, but may be listing some classic examples from references texts would be helpful for starters? |
Hi, sorry for responding late. In my attempt to encode graph-based models like Bayesian networks in pyro, I realize that there really needs to be a better way to do it. Let me elaborate: Typical flow to solve real-world problems through graph-based models is As per my understanding, this flow is not supported; the flow currently supported (e.g. the nn api) is a layer-by-layer organization which does not permit within-layer connectivity. It may be important to support the above flow natively in pyro. Thoughts? |
@SourabhKul you can use Pyro easily for your Bayesian network workflow, except structure learning which you would need to hand-code on top of Pyro. I'm sorry if you found Pyro confusing coming from a Bayes net background. We could definitely use help with documentation. |
Thanks for the feedback, I'll give it another try after I go through more examples. It might just be that I need to be more familiar with pyro. |
@SourabhKul Great. If you have any intro questions, the best place to ask is https://forum.pyro.ai |
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. |
@patrickeganfoley that would be great! i know at least two people who would love to see that |
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. |
@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. |
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 |
I have a couple of projects involving Pyro and basketball: Bayesian Neural Network Win Probability NBA Player Ratings Model Bayesian Meta-Mock Draft (Aggregating Draft Rankings) |
@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. |
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! |
Here's another post I made yesterday. Are The Boston Celtics Better Than Random In Preventing Wide Open 3s? |
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 |
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
Who?
Anyone reading this!
The text was updated successfully, but these errors were encountered: