pyro-ppl / pyro

Deep universal probabilistic programming with Python and PyTorch
http://pyro.ai
Apache License 2.0
8.5k stars 981 forks source link

How to learn the underlying theory to work with Pyro? #2024

Open Nathan-Furnal opened 5 years ago

Nathan-Furnal commented 5 years ago

I know this is probably off-topic but I'm looking for good resources to go paste the copy/paste/simply reworking existing examples steps.

Basically, where can I go to, past the tutorials and occasional papers being referenced, to get a good understanding of all the models and strategies provided by Pyro?

Thanks

JamesTrick commented 5 years ago

Hi @Nathan-Furnal

The forum probably would be a better place to get an active response from others on this question. there's also a thread of someone asking similar.

Suggestions of missing tutorials or docs would be cool. Personally, I found reading docs, and checking out the tests for usage helped. @fehiepsi has also re-written a number of chapters from Statistical Rethinking in Pyro here - I found that great.

fehiepsi commented 5 years ago

Re Statistical Rethinking (SR) book: I have not updated the chapters for more than half a year so something (hopefully not much) will not work. The CPU memory issue (which prevented me replicating HMC results) has been resolved with recent Pyro versions. I found that SR book (together with PRML book) is awesome to learn Bayesian stuffs but sadly I don't have time to work on it in near future. I'll set out some weekends to clean up and call for other contributors to port the remaining chapters. Thanks for reminding me about it, @JamesTrick ! :)

fritzo commented 5 years ago

Beyond tutorials, there are some additional models in the sandbox repo: https://github.com/pyro-ppl/sandbox

nm-narasimha commented 5 years ago

Hi fritzo,

I get an error with Pyro sandbox example - part III

https://github.com/pyro-ppl/sandbox/blob/master/2019-08-time-series/part_iii_custom.ipynb ` with torch.no_grad(): guide_trace =poutine.trace(guide).get_trace(features_train, counts_train) hmm = poutine.replay(model_2, guide_trace)(features_train, counts_train) init_dist = hmm.filter(guide_trace.nodes["log_rates"]["value"])

I got this error:- AttributeError: 'GaussianHMM' object has no attribute 'filter'

Sorry for bad formatting. Couldn't fix it quickly..

Any suggestions on how to forecast? Can you also refer examples for forecast that can be applicable in all cases..?

Narasimha

JamesTrick commented 5 years ago

@NarasimhaM3101 - Can you please check your Pyro version (running print(pyro.__version__) will give you this). You might need to upgrade your pyro version as filter was only added in this PR #2010.