-
-
Notifications
You must be signed in to change notification settings - Fork 988
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
Implement Bayesian regression example from NumPyro in Pyro #3006
base: dev
Are you sure you want to change the base?
Implement Bayesian regression example from NumPyro in Pyro #3006
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@arijc76 sorry I am so slow this week, great work! Here are some minor comments: Notebook
Rendering
Testing Your notebook is being executed correctly during CI (modulo reducing
|
There may be some difference between the |
The custom def predict(post_samples, model, *args, **kwargs):
conditioned_model = poutine.condition(model, post_samples)
model_trace = poutine.trace(conditioned_model).get_trace(*args, **kwargs)
return model_trace.nodes["obs"]["value"]
def predict_fn(post_samples):
with pyro.plate("samples", num_samples):
return predict(post_samples, model, marriage=torch.tensor(dset.MarriageScaled.values, dtype=torch.float)) |
@eb8680 Thanks for this suggestion. |
@eb8680 When I run
|
I can't reproduce your error, but you can tell Sphinx not to treat warnings as errors by overriding the
|
Thanks @eb8680 [UPDATED] I have committed the notebook with the changes as mentioned above. Please take a look. Thanks. |
This PR contributes the implementation of a Bayesian regression example / tutorial from NumPyro to Pyro.
There is one issue that I am not able to address yet - I have to run the below cell before running the cells for Model 2 and Model 3. I did not face this issue with the NumPyro tutorial.
Please let me know what you think @eb8680